-
-
Notifications
You must be signed in to change notification settings - Fork 949
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
feat: Add more lint rules #1703
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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).docs
and added dartdoc comments with///
.examples
.Breaking Change
Related Issues