-
Notifications
You must be signed in to change notification settings - Fork 124
Fix most current canonical score lints #2496
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix most current canonical score lints #2496
Conversation
What is the motivation for using this particular set of lints? We're mostly going off of pedantic. |
You can find some more information here. This is the pub scoring set, which @devoncarew described a derivative of as "a potential proposal for a new recommended rule set for Dart". While the Even if the final recommendations change, I thought it would be good if we followed them earlier, so future code already follows it and eases the transition. |
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.
Yes, this does seem to be the way of the future, thanks for getting ahead of it!
Only one change needed; the addition of a hashCode calculation on Class could result in problems.
You can find the current set here: https://github.com/dart-lang/linter/blob/master/tool/canonical/score.yaml
I disabled
non_constant_identifier_names
for now due to how our tests are written, but I did fix a few cases of this line.This PR also deprecates two members.
HTMLBASE_PLACEHOLDER
- Replaced withhtmlBasePlaceholder
which is marked as@internal
. This is due to the old constant naming scheme as well as it doesn't seem like this member(or the behavior it enables) should be used externally.PackageGraph.UninitializedPackageGraph
-> Replaced withPackageGraph.uninitialized
to fit the appropriate naming style and since the secondPackageGraph
is unnecessary.