feat: Add more lint rules#1703
Conversation
st-pasha
left a comment
There was a problem hiding this comment.
I just tried adding a single rule
linter:
rules:
- prefer_asserts_with_message
Into the packages/flame/analysis_options.yaml file, and sure enough it reports 28 violations of that rule. Which means that even though this PR adds the same rule, the test system somehow failed to run the proper analysis with that rule.
I haven't tried with any other rule, but I suspect there are 100 or so violations still hiding in the larger repo, and we just need to figure out why they are hiding...
|
Also, the assert(_parent != null, 'parent cannot be null');the message is purely tautological and I don't see any way to actually improve it. At the same time, assert messages frequently cause the line to become longer than 80 chars, forcing a single-line assert into a more bloated 4+ lines of code. |
I think I broke it by forgetting to add |
Removing that rule. |
Description
Adds some more lint rules and fixes the issues those rules pointed out.
Checklist
fix:,feat:,docs:etc).docsand added dartdoc comments with///.examples.Breaking Change
Related Issues