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

Unified Diff: pkg/analyzer_cli/lib/src/options.dart

Issue 2704103002: Some improvements to the command-line analyzer's output. (Closed)
Patch Set: review comments Created 3 years, 10 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
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..fdaf6cd16649bb2fb755b569ca7fb3b324f1d7f0 100644
--- a/pkg/analyzer_cli/lib/src/options.dart
+++ b/pkg/analyzer_cli/lib/src/options.dart
@@ -143,6 +143,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 +185,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 +308,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 +342,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 +416,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 +449,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 {

Powered by Google App Engine
This is Rietveld 408576698