-
Notifications
You must be signed in to change notification settings - Fork 1.7k
What to do with style lints that enforce rules that don't exist any more in Effective Dart #57875
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
Comments
I'd be inclined to deprecate. It's noteworthy that |
I disagree. The purpose of the linter is not to enforce the style guide. The purpose of the linter is to enable users to customize the set of diagnostics that are produced by the analyzer. If we have evidence that there are no users that are enabling this lint, then I think it's reasonable to remove it. But we should not remove it just because it's no longer mentioned in the style guide. It's OK for users to choose to follow additional guidelines that are not in the style guide. At the risk of being heretical, it's even OK for users to choose to not follow guidelines that are in the style guide. |
Agreed. But we should certainly remove lints that are irrelevant or problematic in Dart 2. Some used to be in the style guide but were removed (see dart-lang/site-www#863, dart-lang/site-www#889, and other changes to Effective Dart). Here are some possibilities:
Also, it's hard to tell the difference between these two lints, but maybe that's just a matter for the help text:
|
💎 I completely agree. My thinking was that in this case in particular the advice may have gone stale in the presence of optional
Emphatic +1. I'm surprised this isn't being tracked already since we've chatted about it a bunch. Anyway, I opened #57876 to track. @kwalrath: thanks so much for seeding the list!
Opened #57877. Thanks! |
I think this has been resolved then. We can keep rules even if their backlink to Effective Dart disappears. |
For instance
prefer_constructors_over_static_methods
was created to enforce a lint that has disappeared:The text was updated successfully, but these errors were encountered: