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

Unified Diff: pkg/analyzer_experimental/lib/options.dart

Issue 32823008: normalize cmdline analyzer flags for dart based analyzer (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: merge Created 7 years, 2 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 | « no previous file | pkg/analyzer_experimental/test/options_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
« no previous file with comments | « no previous file | pkg/analyzer_experimental/test/options_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698