Skip to content

Remove 1745 decorative breaks - #123259

Merged
auto-submit[bot] merged 17 commits into
flutter:masterfrom
goderbauer:lintSyncPost3
Mar 22, 2023
Merged

auto-submit[bot] merged 17 commits into
flutter:masterfrom
goderbauer:lintSyncPost3

Conversation

@goderbauer

@goderbauer goderbauer commented Mar 22, 2023 •

Copy link
Copy Markdown
Member

Part of #118837.

In Dart 3, the break statement is optional in switch/case. This PR removes them and enforces that with a lint. It also removes all lints that are no longer valid with Dart 3.

Further reading: https://github.com/dart-lang/language/blob/master/accepted/future-releases/0546-patterns/feature-specification.md#implicit-break

@flutter-dashboard flutter-dashboard Bot added a: accessibility Accessibility, e.g. VoiceOver or TalkBack. (aka a11y) a: animation Animation APIs a: tests "flutter test", flutter_test, or one of our tests a: text input Entering text in a text field or keyboard related problems d: api docs Issues with https://api.flutter.dev/ d: examples Sample code and demos documentation p: cupertino_ui cupertino_ui package in flutter/packages f: focus Focus traversal, gaining or losing focus f: gestures flutter/packages/flutter/gestures repository. p: material_ui material_ui package in flutter/packages f: routes Navigator, Router, and related APIs. f: scrolling Viewports, list views, slivers, etc. framework flutter/packages/flutter repository. See also f: labels. f: integration_test The flutter/packages/integration_test plugin platform-ios iOS applications specifically c: contributor-productivity Team-specific productivity, code health, technical debt. tool Affects the "flutter" command-line tool. See also t: labels. labels Mar 22, 2023
@goderbauer goderbauer mentioned this pull request Mar 22, 2023
23 tasks done
@goderbauer goderbauer changed the title WIP Remove 1745 decorative breaks Mar 22, 2023

@cbracken cbracken left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rslgtm!

Comment thread dev/bots/run_command.dart
print(line);
break;
case OutputMode.capture:
break;

@dkwingsmt dkwingsmt Mar 22, 2023 •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why don't we remove ones like this?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the case is empty, you still need the break. Otherwise, it would fall-through to the next case.

@goderbauer goderbauer added the autosubmit Merge PR when tree becomes green via auto submit App label Mar 22, 2023
@auto-submit
auto-submit Bot merged commit fda9ecf into flutter:master Mar 22, 2023
@goderbauer
goderbauer deleted the lintSyncPost3 branch March 22, 2023 21:12
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Mar 22, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Mar 23, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Mar 23, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Mar 23, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Mar 23, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request May 10, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request May 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

a: accessibility Accessibility, e.g. VoiceOver or TalkBack. (aka a11y) a: animation Animation APIs a: tests "flutter test", flutter_test, or one of our tests a: text input Entering text in a text field or keyboard related problems autosubmit Merge PR when tree becomes green via auto submit App c: contributor-productivity Team-specific productivity, code health, technical debt. d: api docs Issues with https://api.flutter.dev/ d: examples Sample code and demos f: focus Focus traversal, gaining or losing focus f: gestures flutter/packages/flutter/gestures repository. f: integration_test The flutter/packages/integration_test plugin f: routes Navigator, Router, and related APIs. f: scrolling Viewports, list views, slivers, etc. framework flutter/packages/flutter repository. See also f: labels. p: cupertino_ui cupertino_ui package in flutter/packages p: material_ui material_ui package in flutter/packages platform-ios iOS applications specifically tool Affects the "flutter" command-line tool. See also t: labels.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants