Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(284)

Unified Diff: tools/testing/dart/vendored_pkg/args/src/parser.dart

Issue 2827793002: Format all files under tools and utils directory. (Closed)
Patch Set: Format all files under tools and utils directory. Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tools/testing/dart/vendored_pkg/args/args.dart ('k') | tools/yaml2json.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/testing/dart/vendored_pkg/args/src/parser.dart
diff --git a/tools/testing/dart/vendored_pkg/args/src/parser.dart b/tools/testing/dart/vendored_pkg/args/src/parser.dart
index d35f9ea4aff1bb67a1c20034b17574168d0c6502..afdcf58e818b9c9ab747ae1835a48b0fda3a0c56 100644
--- a/tools/testing/dart/vendored_pkg/args/src/parser.dart
+++ b/tools/testing/dart/vendored_pkg/args/src/parser.dart
@@ -106,8 +106,7 @@ class Parser {
*/
void readNextArgAsValue(Option option) {
// Take the option argument from the next command line arg.
- validate(args.length > 0,
- 'Missing argument for "${option.name}".');
+ validate(args.length > 0, 'Missing argument for "${option.name}".');
// Make sure it isn't an option itself.
validate(!_ABBR_OPT.hasMatch(current) && !_LONG_OPT.hasMatch(current),
@@ -130,8 +129,8 @@ class Parser {
var option = grammar.findByAbbreviation(soloOpt[1]);
if (option == null) {
// Walk up to the parent command if possible.
- validate(parent != null,
- 'Could not find an option or flag "-${soloOpt[1]}".');
+ validate(
+ parent != null, 'Could not find an option or flag "-${soloOpt[1]}".');
return parent.parseSoloOption();
}
@@ -161,8 +160,8 @@ class Parser {
var first = grammar.findByAbbreviation(c);
if (first == null) {
// Walk up to the parent command if possible.
- validate(parent != null,
- 'Could not find an option with short name "-$c".');
+ validate(
+ parent != null, 'Could not find an option with short name "-$c".');
return parent.parseAbbreviation(innermostCommand);
} else if (!first.isFlag) {
// The first character is a non-flag option, so the rest must be the
@@ -172,9 +171,10 @@ class Parser {
} else {
// If we got some non-flag characters, then it must be a value, but
// if we got here, it's a flag, which is wrong.
- validate(abbrOpt[2] == '',
- 'Option "-$c" is a flag and cannot handle value '
- '"${abbrOpt[1].substring(1)}${abbrOpt[2]}".');
+ validate(
+ abbrOpt[2] == '',
+ 'Option "-$c" is a flag and cannot handle value '
+ '"${abbrOpt[1].substring(1)}${abbrOpt[2]}".');
// Not an option, so all characters should be flags.
// We use "innermostCommand" here so that if a parent command parses the
@@ -194,16 +194,16 @@ class Parser {
var option = grammar.findByAbbreviation(c);
if (option == null) {
// Walk up to the parent command if possible.
- validate(parent != null,
- 'Could not find an option with short name "-$c".');
+ validate(
+ parent != null, 'Could not find an option with short name "-$c".');
parent.parseShortFlag(c);
return;
}
// In a list of short options, only the first can be a non-flag. If
// we get here we've checked that already.
- validate(option.isFlag,
- 'Option "-$c" must be a flag to be in a collapsed "-".');
+ validate(
+ option.isFlag, 'Option "-$c" must be a flag to be in a collapsed "-".');
setOption(results, option, true);
}
« no previous file with comments | « tools/testing/dart/vendored_pkg/args/args.dart ('k') | tools/yaml2json.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698