prefer const constructors (#8316)
This commit is contained in:
committed by
Adam Barth
parent
663862557b
commit
e9a775bf38
@@ -63,7 +63,7 @@ Future<Null> main(List<String> rawArgs) async {
|
||||
exitCode = 1;
|
||||
|
||||
print('Task result:');
|
||||
print(new JsonEncoder.withIndent(' ').convert(result));
|
||||
print(const JsonEncoder.withIndent(' ').convert(result));
|
||||
section('Finished task "$taskName"');
|
||||
}
|
||||
}
|
||||
@@ -115,7 +115,7 @@ final ArgParser _argParser = new ArgParser()
|
||||
splitCommas: true,
|
||||
callback: (List<String> value) {
|
||||
if (value.isNotEmpty) {
|
||||
throw new FormatException(
|
||||
throw const FormatException(
|
||||
'Invalid option --test. Did you mean --task (-t)?',
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user