Skip to content

Conversation

@zanderso
Copy link
Member

@zanderso zanderso commented Sep 13, 2019

Description

This PR adds curly braces around single statement control structures that lacked them, and flips the linter flag that enforces this. I'm doing this because:

  1. The code base was not consistent, often switching back and forth in the same file.
  2. This puts the tool further in the intersection of Dart style and Flutter style.
  3. This provides a glimmer of hope that one day we might be able to use dartfmt.

Related Issues

?

Tests

No change in functionality. Style enforced by analyzer flag going forward.

Breaking Change

Does your PR require Flutter developers to manually update their apps to accommodate your change?

  • Yes, this is a breaking change (Please read [Handling breaking changes]). Replace this with a link to the e-mail where you asked for input on this proposed change.
  • No, this is not a breaking change.

@zanderso zanderso added the tool Affects the "flutter" command-line tool. See also t: labels. label Sep 13, 2019
Copy link
Contributor

@jonahwilliams jonahwilliams left a comment

Choose a reason for hiding this comment

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

LGTM

@codecov
Copy link

codecov bot commented Sep 13, 2019

Codecov Report

Merging #40446 into master will increase coverage by 0.25%.
The diff coverage is 60.49%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #40446      +/-   ##
==========================================
+ Coverage   58.16%   58.41%   +0.25%     
==========================================
  Files         193      192       -1     
  Lines       18719    18608     -111     
==========================================
- Hits        10888    10870      -18     
+ Misses       7831     7738      -93
Flag Coverage Δ
#flutter_tool 58.41% <60.49%> (+0.25%) ⬆️
Impacted Files Coverage Δ
packages/flutter_tools/lib/src/tracing.dart 0% <ø> (ø) ⬆️
...tools/lib/src/commands/make_host_app_editable.dart 22.22% <0%> (ø) ⬆️
packages/flutter_tools/lib/src/commands/logs.dart 18.75% <0%> (ø) ⬆️
packages/flutter_tools/lib/src/test/runner.dart 0% <0%> (ø) ⬆️
...ages/flutter_tools/lib/src/commands/build_aot.dart 39.79% <0%> (+1.02%) ⬆️
packages/flutter_tools/lib/src/base/io.dart 51.35% <0%> (ø) ⬆️
...s/flutter_tools/lib/src/test/flutter_platform.dart 28.41% <0%> (ø) ⬆️
.../flutter_tools/lib/src/android/android_studio.dart 50% <0%> (ø) ⬆️
...lutter_tools/lib/src/commands/update_packages.dart 3.63% <0%> (ø) ⬆️
...ages/flutter_tools/lib/src/commands/build_ios.dart 35.29% <0%> (ø) ⬆️
... and 104 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 066cad2...4081413. Read the comment docs.

Copy link

@blasten blasten left a comment

Choose a reason for hiding this comment

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

Thanks for making this change!

@zanderso zanderso merged commit e2340c6 into flutter:master Sep 13, 2019
@zanderso zanderso deleted the curly-braces branch September 13, 2019 21:51
Inconnu08 pushed a commit to Inconnu08/flutter that referenced this pull request Sep 30, 2019
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 4, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

tool Affects the "flutter" command-line tool. See also t: labels.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants