-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Options support to default in to all lints. #25843
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 don't have access to the doc yet (requested access). I'd like predefined groups of lint rules like (without too much reasoning about what groups actually make sense and how they should be named), for example:
then in
New rules could get added to the group they fit in automatically (could be a breaking change though when CI builds depend on lint rules not producing warnings). If this isn't the desired behavior
A rule can be a member of more than one group. |
Access granted! What you describe is exactly where this could ultimately lead: targeted builtin rulesets. Ideally we should also provide a means for them to be created and hosted externally (e.g., flutter rules would be maintained by flutter, etc.) |
In general, we do not want lints to be opt-out because we want it to be possible to define contradictory lint rules and allow users to decide which rules to apply. Providing rule sets would solve most of the problems but allow lints to remain opt-in. |
That sounds totally valid!
Is there a specific case for this that we can subscribe to for updates? Thanks! |
This is probably the closest: #57364. There's been a lot of discussion, but no agreement on exactly how these groups should work. |
Lints are currently opt-in. A rationale for this is that lints by design potentially produce false positives and, moreover, the full set of defined lints contains a number of rules that contradict each other. Confronting users with a flood of contradicting advice would, needless to say, be a bad thing. However, the downside is that when new lints are added they are not easily discovered. A possible remedy would be to add a new property to lint rule configuration in
.analysis_options
that enables users to enable all lints and selectively identify those they want to exclude.Design discussion here.
The text was updated successfully, but these errors were encountered: