Commit graph

1 commit

Author SHA1 Message Date
trvon
1e7d7b72d5
fix(providers): drop the dangling "by type" clause when there are no declarations
Some checks failed
Tests / Static Analysis (push) Has been cancelled
Tests / Tests (push) Has been cancelled
A project with ChangeNotifier classes but no provider declarations printed:

  provider rules examined 10 ChangeNotifier class(es) (0 consumed by a
  Consumer/Selector), and 36 observable mutator(s) were checked for a notify
  path. Provider declarations by type: .

That trailing "Provider declarations by type: ." is a dangling colon and full
stop. It reads as a truncated sentence rather than as "this app declares none",
which is how it surfaced on word_alive. The clause is now omitted when the list
is empty, and still lists kinds most-common-first when it is not.

Found by reading an external auditor's raw tool output after its run died on an
API rate limit before it could write a report - its observations were still
worth salvaging even though it never reached a conclusion.

The note is extracted into providerRuleNote() so both branches are directly
testable; before this the empty case was only reachable through a real project.
2026-09-20 21:34:42 -06:00