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

setting linter rules in analysis_options.yaml is confusing #58693

Open
DetachHead opened this issue Mar 23, 2022 · 2 comments
Open

setting linter rules in analysis_options.yaml is confusing #58693

DetachHead opened this issue Mar 23, 2022 · 2 comments
Labels
analyzer-linter Issues with the analyzer's support for the linter package 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

@DetachHead
Copy link

DetachHead commented Mar 23, 2022

Describe the issue
as far as i can tell, there are three different sections for linter rules:

  • linter.rules
  • analyzer.language
  • analyzer.strong-mode

i think it would be much simpler if there was only one. currently it's confusing to new users as it's difficult to find the correct section or track down the documentation for individual rules - see #48553 (comment) and #48650

@srawlins
Copy link
Member

We should also provide a schema at schemastore.org.

@bwilkerson
Copy link
Member

The plan is for the analyzer.strong-mode section to be deprecated and eventually for support to be removed. It will be replaced by the analyzer.language section, but restructured slightly to be more consistent with the current language definition.

The reason for the analyzer.language section is that we originally thought of these checks as being a way to make the language's type system more sound. I think that was more accurate when we were experimenting with "strong mode" (which led to some of the changes added in Dart 2.0). We might well want to think about making these lints now rather than "language" modifiers.

I believe it's the case that these checks are all local now, and don't really impact the language semantics.

@srawlins srawlins added the type-enhancement A request for a change that isn't a bug label Jun 29, 2022
@srawlins srawlins changed the title setting linter rules in analyzis_options.yaml is confusing setting linter rules in analysis_options.yaml is confusing Oct 24, 2022
@srawlins srawlins added the P3 A lower priority bug or feature request label Oct 24, 2022
@devoncarew devoncarew added analyzer-linter Issues with the analyzer's support for the linter package area-analyzer Use area-analyzer for Dart analyzer issues, including the analysis server and code completion. labels Nov 19, 2024
@devoncarew devoncarew transferred this issue from dart-lang/linter Nov 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
analyzer-linter Issues with the analyzer's support for the linter package 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