-
Notifications
You must be signed in to change notification settings - Fork 224
Clean up --help #1331
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
Clean up --help #1331
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -25,15 +25,15 @@ final ArgParser _parser = (() { | |
| if (!Platform.isWindows) allRuntimes.remove(Runtime.internetExplorer); | ||
|
|
||
| parser.addFlag('help', | ||
| abbr: 'h', negatable: false, help: 'Shows this usage information.'); | ||
| abbr: 'h', negatable: false, help: 'Show this usage information.'); | ||
| parser.addFlag('version', | ||
| negatable: false, help: "Shows the package's version."); | ||
| negatable: false, help: 'Show the package:test version.'); | ||
|
|
||
| // Note that defaultsTo declarations here are only for documentation purposes. | ||
| // We pass null instead of the default so that it merges properly with the | ||
| // config file. | ||
|
|
||
| parser.addSeparator('======== Selecting Tests'); | ||
| parser.addSeparator('Selecting Tests:'); | ||
| parser.addMultiOption('name', | ||
| abbr: 'n', | ||
| help: 'A substring of the name of the test to run.\n' | ||
|
|
@@ -58,7 +58,7 @@ final ArgParser _parser = (() { | |
| parser.addFlag('run-skipped', | ||
| help: 'Run skipped tests instead of skipping them.'); | ||
|
|
||
| parser.addSeparator('======== Running Tests'); | ||
| parser.addSeparator('Running Tests:'); | ||
|
|
||
| // The UI term "platform" corresponds with the implementation term "runtime". | ||
| // The [Runtime] class used to be called [TestPlatform], but it was changed to | ||
|
|
@@ -87,28 +87,29 @@ final ArgParser _parser = (() { | |
| help: 'The default test timeout. For example: 15s, 2x, none', | ||
| defaultsTo: '30s'); | ||
| parser.addFlag('pause-after-load', | ||
| help: 'Pauses for debugging before any tests execute.\n' | ||
| help: 'Pause for debugging before any tests execute.\n' | ||
| 'Implies --concurrency=1, --debug, and --timeout=none.\n' | ||
| 'Currently only supported for browser tests.', | ||
| negatable: false); | ||
| parser.addFlag('debug', | ||
| help: 'Runs the VM and Chrome tests in debug mode.', negatable: false); | ||
| help: 'Run the VM and Chrome tests in debug mode.', negatable: false); | ||
| parser.addOption('coverage', | ||
| help: 'Gathers coverage and outputs it to the specified directory.\n' | ||
| help: 'Gather coverage and output it to the specified directory.\n' | ||
| 'Implies --debug.', | ||
| valueHelp: 'directory'); | ||
| parser.addFlag('chain-stack-traces', | ||
| help: 'Chained stack traces to provide greater exception details\n' | ||
| help: 'Use chained stack traces to provide greater exception details\n' | ||
| 'especially for asynchronous code. It may be useful to disable\n' | ||
| 'to provide improved test performance but at the cost of\n' | ||
| 'debuggability.', | ||
| defaultsTo: true); | ||
| parser.addFlag('no-retry', | ||
| help: "Don't re-run tests that have retry set.", | ||
| help: "Don't rerun tests that have retry set.", | ||
| defaultsTo: false, | ||
| negatable: false); | ||
| parser.addOption('test-randomize-ordering-seed', | ||
| help: 'The seed to randomize the execution order of test cases.\n' | ||
| help: 'Use the specified seed to randomize the execution order of test' | ||
| ' cases.\n' | ||
| 'Must be a 32bit unsigned integer or "random".\n' | ||
| 'If "random", pick a random seed to use.\n' | ||
| 'If not passed, do not randomize test case execution order.'); | ||
|
|
@@ -118,25 +119,24 @@ final ArgParser _parser = (() { | |
| reporterDescriptions[reporter] = allReporters[reporter]!.description; | ||
| } | ||
|
|
||
| parser.addSeparator('======== Output'); | ||
| parser.addSeparator('Output:'); | ||
| parser.addOption('reporter', | ||
| abbr: 'r', | ||
| help: 'The runner used to print test results.', | ||
| help: 'Set how to print test results.', | ||
| defaultsTo: defaultReporter, | ||
| allowed: reporterDescriptions.keys.toList(), | ||
| allowedHelp: reporterDescriptions); | ||
| parser.addOption('file-reporter', | ||
| help: 'The reporter used to write test results to a file.\n' | ||
| help: 'Set the reporter used to write test results to a file.\n' | ||
| 'Should be in the form <reporter>:<filepath>, ' | ||
| 'e.g. "json:reports/tests.json"'); | ||
| 'Example: "json:reports/tests.json"'); | ||
| parser.addFlag('verbose-trace', | ||
| negatable: false, | ||
| help: 'Whether to emit stack traces with core library frames.'); | ||
| negatable: false, help: 'Emit stack traces with core library frames.'); | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do you know why this isn't negatable? This came up on the doc.
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I found the PR that added the flag: b61a536 Doesn't have a reason though. |
||
| parser.addFlag('js-trace', | ||
| negatable: false, | ||
| help: 'Whether to emit raw JavaScript stack traces for browser tests.'); | ||
| help: 'Emit raw JavaScript stack traces for browser tests.'); | ||
| parser.addFlag('color', | ||
| help: 'Whether to use terminal colors.\n(auto-detected by default)'); | ||
| help: 'Use terminal colors.\n(auto-detected by default)'); | ||
|
|
||
| /// The following options are used only by the internal Google test runner. | ||
| /// They're hidden and not supported as stable API surface outside Google. | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
I assume this means that users won't see the help text changes until they're using a null safe version of package:test?
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.
That I don't know. @natebosch
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.
That is correct, but using a null safe compatible version of
package:testdoes not require that the user migrates to null safety.