| Index: pkg/analyzer_experimental/lib/options.dart
|
| diff --git a/pkg/analyzer_experimental/lib/options.dart b/pkg/analyzer_experimental/lib/options.dart
|
| index 9b3ffac04d1857ae0ac8629220f3ef09871bf6e1..32fc49ae4a03bfe06feae835805687b02a9b882c 100644
|
| --- a/pkg/analyzer_experimental/lib/options.dart
|
| +++ b/pkg/analyzer_experimental/lib/options.dart
|
| @@ -58,13 +58,13 @@ class CommandLineOptions {
|
| */
|
| CommandLineOptions._fromArgs(ArgResults args)
|
| : shouldBatch = args['batch'],
|
| - machineFormat = args['machine'],
|
| + machineFormat = args['machine'] || args['format'] == 'machine',
|
| displayVersion = args['version'],
|
| disableHints = args['no-hints'],
|
| ignoreUnrecognizedFlags = args['ignore-unrecognized-flags'],
|
| perf = args['perf'],
|
| - showPackageWarnings = args['show-package-warnings'],
|
| - showSdkWarnings = args['show-sdk-warnings'],
|
| + showPackageWarnings = args['show-package-warnings'] || args['package-warnings'],
|
| + showSdkWarnings = args['show-sdk-warnings'] || args['warnings'],
|
| warningsAreFatal = args['fatal-warnings'],
|
| dartSdkPath = args['dart-sdk'],
|
| packageRootPath = args['package-root'],
|
| @@ -100,9 +100,12 @@ class CommandLineOptions {
|
| ..addFlag('batch', abbr: 'b', help: 'Run in batch mode',
|
| defaultsTo: false, negatable: false)
|
| ..addOption('dart-sdk', help: 'The path to the Dart SDK')
|
| - ..addOption('package-root', help: 'The path to the package root')
|
| + ..addOption('package-root', abbr: 'p',
|
| + help: 'The path to the package root')
|
| + ..addOption('format',
|
| + help: 'Specifies the format in which errors are displayed')
|
| ..addFlag('machine',
|
| - help: 'Print errors in a format suitable for parsing',
|
| + help: 'Print errors in a format suitable for parsing (deprecated)',
|
| defaultsTo: false, negatable: false)
|
| ..addFlag('version', help: 'Print the analyzer version',
|
| defaultsTo: false, negatable: false)
|
| @@ -113,13 +116,18 @@ class CommandLineOptions {
|
| defaultsTo: false, negatable: false)
|
| ..addFlag('fatal-warnings', help: 'Treat non-type warnings as fatal',
|
| defaultsTo: false, negatable: false)
|
| - ..addFlag('show-package-warnings',
|
| + ..addFlag('package-warnings',
|
| help: 'Show warnings from package: imports',
|
| defaultsTo: false, negatable: false)
|
| + ..addFlag('show-package-warnings',
|
| + help: 'Show warnings from package: imports (deprecated)',
|
| + defaultsTo: false, negatable: false)
|
| ..addFlag('perf',
|
| help: 'Show performance statistics',
|
| defaultsTo: false, negatable: false)
|
| - ..addFlag('show-sdk-warnings', help: 'Show warnings from SDK imports',
|
| + ..addFlag('warnings', help: 'Show warnings from SDK imports',
|
| + defaultsTo: false, negatable: false)
|
| + ..addFlag('show-sdk-warnings', help: 'Show warnings from SDK imports (deprecated)',
|
| defaultsTo: false, negatable: false)
|
| ..addFlag('help', abbr: 'h', help: 'Display this help message',
|
| defaultsTo: false, negatable: false);
|
|
|