这是indexloc提供的服务,不要输入任何密码
Skip to content

Use "aliases" in args to fix some technical debt #81073

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
Apr 27, 2021

Conversation

Hixie
Copy link
Contributor

@Hixie Hixie commented Apr 23, 2021

All arguments (except the "precache" ones that map to actual internal values) now follow the standard lowercase with hyphens pattern for command line arguments. Also, "uri" has been changed to "url" in various places.

Old names still work, for backwards compatibility.

Fixes #76271.

Pre-launch Checklist

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • I read the Tree Hygiene wiki page, which explains my responsibilities.
  • I read and followed the Flutter Style Guide, including Features we expect every widget to implement.
  • I signed the CLA.
  • I listed at least one issue that this PR fixes in the description above.
  • I updated/added relevant documentation (doc comments with ///).
  • I added new tests to check the change I am making or feature I am adding, or Hixie said the PR is test-exempt.
  • All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel on Discord.

@flutter-dashboard flutter-dashboard bot added the tool Affects the "flutter" command-line tool. See also t: labels. label Apr 23, 2021
@google-cla google-cla bot added the cla: yes label Apr 23, 2021
@Hixie
Copy link
Contributor Author

Hixie commented Apr 23, 2021

The three commits may be easier to review in isolation than as one diff, they are intentionally separated.

@Hixie Hixie force-pushed the tool_arg_todos3 branch from 34e098b to 29c655b Compare April 23, 2021 20:40
@jonahwilliams jonahwilliams self-requested a review April 23, 2021 20:46
@Hixie Hixie force-pushed the tool_arg_todos3 branch from 29c655b to 6689992 Compare April 23, 2021 21:58
@@ -59,34 +58,45 @@ const String _needHelp = 'Every option must have help explaining what it does, e
const String _header = ' Comment: ';

void verifyOptions(String command, Iterable<Option> options) {
assert(command.contains('"'));
/*late*/ String target;
Copy link
Contributor

Choose a reason for hiding this comment

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

This actually doesn't need to be late since it is definitely assigned (I believe it could even be final)

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 with nit on the null safe comment

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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.

Fix TODOs relating to argument names in flutter_tools
3 participants