Skip to content

Add some options to format subcommand #18360

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

Merged
merged 4 commits into from
Jul 24, 2018

Conversation

moznion
Copy link
Contributor

@moznion moznion commented Jun 11, 2018

This pull-request introduces some options to flutter format subcommand.

  • --dry-run, -n
  • --set-exit-if-changes
  • --machine, -m

These options are passed through to dartfmt command.

This patch is related to #12797.

@moznion moznion changed the title Add some opts format sub command Add some options to format subcommand Jun 11, 2018
@@ -36,7 +56,24 @@ class FormatCommand extends FlutterCommand {
}

final String dartfmt = sdkBinaryName('dartfmt');
final List<String> cmd = <String>[dartfmt, '-w']..addAll(argResults.rest);
final List<String> cmd = <String>[dartfmt];
Copy link
Contributor

Choose a reason for hiding this comment

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

please rename "cmd" so that it's not an abbreviation (see our style guide). Thanks.

Copy link
Contributor Author

@moznion moznion Jul 3, 2018

Choose a reason for hiding this comment

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

Thank you for pointed it out. I fixed it at 3f1a299.

@Hixie
Copy link
Contributor

Hixie commented Jul 3, 2018

LGTM

@Hixie
Copy link
Contributor

Hixie commented Jul 24, 2018

Thanks for your contribution! Sorry it took so long to land.

@Hixie Hixie merged commit 46da853 into flutter:master Jul 24, 2018
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 10, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants