Skip to content

add new lint: unnecessary_breaks #58860

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

Closed
pq opened this issue Sep 8, 2022 · 2 comments · Fixed by dart-archive/linter#3981
Closed

add new lint: unnecessary_breaks #58860

pq opened this issue Sep 8, 2022 · 2 comments · Fixed by dart-archive/linter#3981
Labels
devexp-linter Issues with the analyzer's support for the linter package legacy-area-analyzer Use area-devexp instead. linter-lint-proposal linter-new-language-feature P2 A bug or feature request we're likely to work on
Milestone

Comments

@pq
Copy link
Member

pq commented Sep 8, 2022

From the spec:

this proposal removes the requirement that each non-empty case body definitely exit. Instead, a non-empty case body implicitly jumps to the end of the switch after completion.

We might consider linting on unnecessary breaks.

@pq pq changed the title 🤔 ➕ consider new lint: unnecessary_breaks consider new lint: unnecessary_breaks Sep 8, 2022
@pq pq added linter-lint-proposal linter-status-pending P2 A bug or feature request we're likely to work on linter-new-language-feature labels Sep 8, 2022
@bwilkerson
Copy link
Member

Yes, I think we do.

@pq
Copy link
Member Author

pq commented Sep 8, 2022

/fyi @munificent for 2 cents.

@pq pq changed the title consider new lint: unnecessary_breaks add new lint: unnecessary_breaks Jan 5, 2023
@pq pq added this to the Dart 3 beta 1 milestone Jan 5, 2023
@devoncarew devoncarew added devexp-linter Issues with the analyzer's support for the linter package legacy-area-analyzer Use area-devexp instead. labels Nov 19, 2024
@devoncarew devoncarew transferred this issue from dart-archive/linter Nov 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
devexp-linter Issues with the analyzer's support for the linter package legacy-area-analyzer Use area-devexp instead. linter-lint-proposal linter-new-language-feature P2 A bug or feature request we're likely to work on
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants