-
Notifications
You must be signed in to change notification settings - Fork 9.8k
[flutter_plugin_tool] Fix iOS/macOS naming #4861
[flutter_plugin_tool] Fix iOS/macOS naming #4861
Conversation
Fixes capitalization of iOS and macOS in Dart names to match the Dart naming rules for two-letter abbreviations, bringing the tool code into compliance with the recent updates to the Flutter style guide. Since this touched two of the `kPlatform...` constants already, I opportunistically fixed the long-standing naming mistake of those using a `k` prefix, which isn't done in Dart style.
Can you add a link to the rule change in the description? |
argParser.addFlag(platformMacOS); | ||
argParser.addFlag(platformWeb); | ||
argParser.addFlag(platformWindows); | ||
argParser.addFlag(platformWinUwp); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wouldn't you want platformWinUWP
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
UWP is three letters, not two.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"iOS" is 3 letters too. It's not a 2 letter acronym. If this is what you all decided upon that's fine but I think we need to do a better job describing the algorithm like the Java style guide does. I think the way that is written leaves zero ambiguities.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
UWP is unambiguously not a two-letter acronym (which is what the Dart style guide makes an exception for). platfromWinUWP
is therefore unambiguously against Dart style.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm as long as thats what the team wants, it seems a bit more ambiguous than the previous rules though imo.
test-exempt: code refactor with no semantic change |
@gaaclarke I added more to @stuartmorgan's style guide changes to try to be clearer, PTAL. |
* google/master: (340 commits) [camera]remove "selfRef" for SavePhotoDelegate and ensure thread safety (flutter#4780) Roll Flutter from 919d205 to adafd66 (5 revisions) (flutter#4876) [google_sign_in] Update platform interface analysis options (flutter#4872) Roll Flutter from b623279 to 919d205 (2 revisions) (flutter#4871) Roll Flutter from 14a2b13 to b623279 (5 revisions) (flutter#4870) [image_picker] Update platform interface analysis options (flutter#4837) [ci] Re-enable stable webview Android tests (flutter#4867) Roll Flutter from 286c975 to 14a2b13 (1 revision) (flutter#4865) [local_auth] support localizedFallbackTitle in IOSAuthMessages (flutter#3806) [image_picker] Update app-facing and web analysis options (flutter#4838) Roll Flutter from 8386344 to 286c975 (4 revisions) (flutter#4864) Roll Flutter from e9f83cf to 8386344 (6 revisions) (flutter#4862) [camera] Switch web package to new analysis options (flutter#4834) [flutter_plugin_tool] Fix iOS/macOS naming (flutter#4861) [webview_flutter] Fix debuggingEnabled on Android (flutter#4859) Roll Flutter from ca2a751 to e9f83cf (10 revisions) (flutter#4857) fix license (flutter#4858) [video_player] add allowBackgroundPlayback option platform interface changes (flutter#4807) [video_player] Updated Pigeon version (flutter#4726) Roll Flutter from 381cb28 to ca2a751 (5 revisions) (flutter#4850) ... # Conflicts: # packages/camera/camera/CHANGELOG.md # packages/camera/camera/android/build.gradle # packages/camera/camera/android/src/main/java/io/flutter/plugins/camera/Camera.java # packages/camera/camera/android/src/main/java/io/flutter/plugins/camera/MethodCallHandlerImpl.java # packages/camera/camera/ios/Classes/CameraPlugin.m # packages/camera/camera/ios/camera.podspec # packages/camera/camera/lib/camera.dart # packages/camera/camera/lib/src/camera_controller.dart # packages/camera/camera/pubspec.yaml
Fixes capitalization of iOS and macOS in Dart names to match the Dart
naming rules for two-letter abbreviations, bringing the tool code into
compliance with the recent updates to the Flutter style guide:
https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo#capitalize-identifiers-consistent-with-their-spelling
Since this touched two of the
kPlatform...
constants already, Iopportunistically fixed the long-standing naming mistake of those using
a
k
prefix, which isn't done in Dart style.Pre-launch Checklist
dart format
.)[shared_preferences]
pubspec.yaml
with an appropriate new version according to the pub versioning philosophy, or this PR is exempt from version changes.CHANGELOG.md
to add a description of the change, following repository CHANGELOG style.///
).