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

Unified Diff: lib/src/option.dart

Issue 849023002: format code, removed unused variables and deprecated usage (Closed) Base URL: https://github.com/dart-lang/args.git@master
Patch Set: nits Created 5 years, 11 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 | « lib/src/arg_results.dart ('k') | lib/src/parser.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/src/option.dart
diff --git a/lib/src/option.dart b/lib/src/option.dart
index 6edc8abcfb493672ee7f1d0d98d6ba19ce937b4e..b2292dbbc4f892cbc0a1c46b3ce0184a8e3a9131 100644
--- a/lib/src/option.dart
+++ b/lib/src/option.dart
@@ -43,12 +43,13 @@ class Option {
Option._(this.name, this.abbreviation, this.help, this.valueHelp,
List<String> allowed, Map<String, String> allowedHelp, this.defaultValue,
- this.callback, this.type, {this.negatable, this.hide: false}) :
- this.allowed = allowed == null ?
- null : new UnmodifiableListView(allowed),
- this.allowedHelp = allowedHelp == null ?
- null : new UnmodifiableMapView(allowedHelp) {
-
+ this.callback, this.type, {this.negatable, this.hide: false})
+ : this.allowed = allowed == null
+ ? null
+ : new UnmodifiableListView(allowed),
+ this.allowedHelp = allowedHelp == null
+ ? null
+ : new UnmodifiableMapView(allowedHelp) {
if (name.isEmpty) {
throw new ArgumentError('Name cannot be empty.');
} else if (name.startsWith('-')) {
@@ -63,7 +64,7 @@ class Option {
if (abbreviation != null) {
if (abbreviation.length != 1) {
throw new ArgumentError('Abbreviation must be null or have length 1.');
- } else if(abbreviation == '-') {
+ } else if (abbreviation == '-') {
throw new ArgumentError('Abbreviation cannot be "-".');
}
@@ -121,4 +122,4 @@ class OptionType {
final String name;
const OptionType._(this.name);
-}
+}
« no previous file with comments | « lib/src/arg_results.dart ('k') | lib/src/parser.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698