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

Mention in the docs for unnecessary_breaks that it's a Dart 3.0 feature #4131

Closed
goderbauer opened this issue Mar 9, 2023 · 2 comments · Fixed by #4173
Closed

Mention in the docs for unnecessary_breaks that it's a Dart 3.0 feature #4131

goderbauer opened this issue Mar 9, 2023 · 2 comments · Fixed by #4173
Labels
P2 A bug or feature request we're likely to work on type-documentation A request to add or improve documentation
Milestone

Comments

@goderbauer
Copy link
Contributor

The docs for unnecessary_breaks should mention that they are enforcing a Dart 3.0 feature. The lint has no effect on code with sdk constraints lower than 3.0.0.

@parlough
Copy link
Member

parlough commented Mar 9, 2023

I wonder if it would make sense for rules in general to specify a required/minimum language version, at least for documentation purposes, to avoid confusion on why a lint isn't applying.

Another recent example I can think of is unnecessary_library_names which would "require" a language version of 2.19.

@pq pq added the type-documentation A request to add or improve documentation label Mar 10, 2023
@pq
Copy link
Member

pq commented Mar 10, 2023

100%.

We did something kind of ad_hoc w/ invalid_case_patterns but I'd love something more general.

I'd sort of imagined we could have the doc generator look at since info in the new State objects attached to lints but haven't finished the thought. 😬

In the meantime, yes, let's at least fix these up for Dart 3.0.

@pq pq added this to the Dart 3 beta 3 milestone Mar 10, 2023
@pq pq added the P2 A bug or feature request we're likely to work on label Mar 10, 2023
@pq pq closed this as completed in #4173 Mar 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P2 A bug or feature request we're likely to work on type-documentation A request to add or improve documentation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants