Index: pkg/analyzer_cli/lib/src/options.dart |
diff --git a/pkg/analyzer_cli/lib/src/options.dart b/pkg/analyzer_cli/lib/src/options.dart |
index 7f8da521abe0780ad7c2472e0edf56c466846155..2ce0126775f4ce9763e86545b405e3682263cf29 100644 |
--- a/pkg/analyzer_cli/lib/src/options.dart |
+++ b/pkg/analyzer_cli/lib/src/options.dart |
@@ -9,10 +9,11 @@ import 'dart:io'; |
import 'package:analyzer/file_system/physical_file_system.dart'; |
import 'package:analyzer/src/command_line/arguments.dart'; |
import 'package:analyzer/src/context/builder.dart'; |
-import 'package:analyzer_cli/src/driver.dart'; |
import 'package:args/args.dart'; |
import 'package:cli_util/cli_util.dart' show getSdkDir; |
+import 'driver.dart'; |
+ |
const _binaryName = 'dartanalyzer'; |
/// Shared exit handler. |
@@ -143,6 +144,9 @@ class CommandLineOptions { |
/// Whether to use memory byte store for analysis driver. |
final bool useAnalysisDriverMemoryByteStore; |
+ /// Emit output in a verbose mode. |
+ final bool verbose; |
+ |
/// Initialize options from the given parsed [args]. |
CommandLineOptions._fromArgs(ArgResults args) |
: buildAnalysisOutput = args['build-analysis-output'], |
@@ -182,7 +186,8 @@ class CommandLineOptions { |
implicitDynamic = !args['no-implicit-dynamic'], |
lintsAreFatal = args['fatal-lints'], |
useAnalysisDriverMemoryByteStore = |
- args['use-analysis-driver-memory-byte-store']; |
+ args['use-analysis-driver-memory-byte-store'], |
+ verbose = args['verbose']; |
/// The path to an analysis options file |
String get analysisOptionsFile => |
@@ -304,10 +309,6 @@ class CommandLineOptions { |
help: 'Do not show hint results.', |
defaultsTo: false, |
negatable: false) |
- ..addFlag(ignoreUnrecognizedFlagsFlag, |
- help: 'Ignore unrecognized command line flags.', |
- defaultsTo: false, |
- negatable: false) |
..addFlag('fatal-hints', |
help: 'Treat hints as fatal.', defaultsTo: false, negatable: false) |
..addFlag('fatal-warnings', |
@@ -342,13 +343,7 @@ class CommandLineOptions { |
abbr: 'v', |
defaultsTo: false, |
help: 'Verbose output.', |
- negatable: false) |
- ..addOption('url-mapping', |
- help: '--url-mapping=libraryUri,/path/to/library.dart directs the ' |
- 'analyzer to use "library.dart" as the source for an import ' |
- 'of "libraryUri".', |
- allowMultiple: true, |
- splitCommas: false); |
+ negatable: false); |
// Build mode options. |
if (!hide) { |
@@ -422,6 +417,11 @@ class CommandLineOptions { |
defaultsTo: false, |
negatable: false, |
hide: hide) |
+ ..addFlag(ignoreUnrecognizedFlagsFlag, |
+ help: 'Ignore unrecognized command line flags.', |
+ defaultsTo: false, |
+ negatable: false, |
+ hide: hide) |
..addFlag('disable-cache-flushing', defaultsTo: false, hide: hide) |
..addOption('x-perf-report', |
help: 'Writes a performance report to the given file (experimental).', |
@@ -450,6 +450,13 @@ class CommandLineOptions { |
help: 'Use memory byte store, not the file system cache.', |
defaultsTo: false, |
negatable: false, |
+ hide: hide) |
+ ..addOption('url-mapping', |
+ help: '--url-mapping=libraryUri,/path/to/library.dart directs the ' |
+ 'analyzer to use "library.dart" as the source for an import ' |
+ 'of "libraryUri".', |
+ allowMultiple: true, |
+ splitCommas: false, |
hide: hide); |
try { |