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

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

Issue 196223004: New verbose flag for the dart command line analyzer (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 9 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/lib/src/analyzer_impl.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/lib/options.dart
diff --git a/pkg/analyzer/lib/options.dart b/pkg/analyzer/lib/options.dart
index bdb58f04636dde83b989b98f49ec013e3d6ff513..b8e18dbdae9be36b969333d8a3234f000ae0d675 100644
--- a/pkg/analyzer/lib/options.dart
+++ b/pkg/analyzer/lib/options.dart
@@ -51,6 +51,9 @@ class CommandLineOptions {
/** The source files to analyze */
final List<String> sourceFiles;
+ /** Whether to print analysis messages and exceptions */
+ final bool verbose;
jwren 2014/03/12 17:40:01 Any other suggestions other than "verbose"? Brian
scheglov 2014/03/12 19:07:01 "verbose" sounds good to me.
+
/**
* Initialize options from the given parsed [args].
*/
@@ -66,6 +69,7 @@ class CommandLineOptions {
warningsAreFatal = args['fatal-warnings'],
dartSdkPath = args['dart-sdk'],
packageRootPath = args['package-root'],
+ verbose = args['verbose'],
sourceFiles = args.rest;
/**
@@ -128,7 +132,9 @@ class CommandLineOptions {
..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);
+ defaultsTo: false, negatable: false)
+ ..addFlag('verbose', abbr: 'v', help: 'Print verbose messages and exceptions',
+ defaultsTo: false, negatable: false, hide: true);
try {
// TODO(scheglov) https://code.google.com/p/dart/issues/detail?id=11061
@@ -206,10 +212,10 @@ class _CommandLineParser {
* See [ArgParser.addFlag()].
*/
void addFlag(String name, {String abbr, String help, bool defaultsTo: false,
- bool negatable: true, void callback(bool value)}) {
+ bool negatable: true, void callback(bool value), bool hide: false}) {
_knownFlags.add(name);
_parser.addFlag(name, abbr: abbr, help: help, defaultsTo: defaultsTo,
- negatable: negatable, callback: callback);
+ negatable: negatable, callback: callback, hide: hide);
}
/**
« no previous file with comments | « no previous file | pkg/analyzer/lib/src/analyzer_impl.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698