Skip to content
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

Notify users when popular but controversial lints are compatible with how they are writing code #54763

Open
jacob314 opened this issue Jan 30, 2024 · 0 comments
Labels
analyzer-ux area-analyzer Use area-analyzer for Dart analyzer issues, including the analysis server and code completion. P3 A lower priority bug or feature request type-enhancement A request for a change that isn't a bug

Comments

@jacob314
Copy link
Member

Motivation:
About 35% of Dart users write code where all locals are inferred but only 6% have enabled the lint omit_local_variable_types.
About 19% of Dart users write code where no locals are inferred but only about 4% have enabled the lint always_specify_types.

If we had a list of "good but controversial" lints we could automatically suggest the lints for cases where >= X% of cases in a project are already consistent with the lint.

Q: Why bother as the user is already generally following the lint on their own?
A: Because it will save users time code reviewing and manually checking that their code conforms to the lints. Without some way of promoting lints that could be useful, the only lints that make a significant impact of user productivity are ones in a recommended set.

Related lint discussion with context on how frequently existing code follows some of the controversial lints: dart-lang/linter#4853

@parlough parlough added the area-analyzer Use area-analyzer for Dart analyzer issues, including the analysis server and code completion. label Jan 30, 2024
@scheglov scheglov added P3 A lower priority bug or feature request type-enhancement A request for a change that isn't a bug labels Jan 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
analyzer-ux area-analyzer Use area-analyzer for Dart analyzer issues, including the analysis server and code completion. P3 A lower priority bug or feature request type-enhancement A request for a change that isn't a bug
Projects
None yet
Development

No branches or pull requests

4 participants