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

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

Issue 15780010: Issue 10871. Fix for analyzing file without absolute path (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 7 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_experimental/lib/options.dart
diff --git a/pkg/analyzer_experimental/lib/options.dart b/pkg/analyzer_experimental/lib/options.dart
index d26060b7e38538e27065342114a1c138a3f33a2a..c6fd30d722751cecd87d2c7ba29daf8da0b41fed 100644
--- a/pkg/analyzer_experimental/lib/options.dart
+++ b/pkg/analyzer_experimental/lib/options.dart
@@ -37,6 +37,9 @@ class CommandLineOptions {
/** The path to the dart SDK */
final String dartSdkPath;
+ /** The path to the package root */
+ final String packageRootPath;
+
/** The source files to analyze */
final List<String> sourceFiles;
@@ -45,12 +48,13 @@ class CommandLineOptions {
*/
CommandLineOptions._fromArgs(ArgResults args)
: shouldBatch = args['batch'],
- machineFormat = args['machine_format'],
- ignoreUnrecognizedFlags = args['ignore_unrecognized_flags'],
- showPackageWarnings = args['show_package_warnings'],
- showSdkWarnings = args['show_sdk_warnings'],
- warningsAreFatal = args['fatal_warnings'],
- dartSdkPath = args['dart_sdk'],
+ machineFormat = args['machine-format'],
+ ignoreUnrecognizedFlags = args['ignore-unrecognized-flags'],
+ showPackageWarnings = args['show-package-warnings'],
+ showSdkWarnings = args['show-sdk-warnings'],
+ warningsAreFatal = args['fatal-warnings'],
+ dartSdkPath = args['dart-sdk'],
+ packageRootPath = args['package-root'],
sourceFiles = args.rest;
/**
@@ -81,18 +85,19 @@ class CommandLineOptions {
var parser = new _CommandLineParser()
..addFlag('batch', abbr: 'b', help: 'Run in batch mode',
defaultsTo: false, negatable: false)
- ..addOption('dart_sdk', help: 'Specify path to the Dart sdk')
- ..addFlag('machine_format', help: 'Specify whether errors '
+ ..addOption('dart-sdk', help: 'The path to the Dart SDK')
+ ..addOption('package-root', help: 'The path to the package root')
+ ..addFlag('machine-format', help: 'Specify whether errors '
'should be in machine format',
defaultsTo: false, negatable: false)
- ..addFlag('ignore_unrecognized_flags',
+ ..addFlag('ignore-unrecognized-flags',
help: 'Ignore unrecognized command line flags',
defaultsTo: false, negatable: false)
- ..addFlag('fatal_warnings', help: 'Treat non-type warnings as fatal',
+ ..addFlag('fatal-warnings', help: 'Treat non-type warnings as fatal',
defaultsTo: false, negatable: false)
- ..addFlag('show_package_warnings', help: 'Show warnings from package: imports',
+ ..addFlag('show-package-warnings', help: 'Show warnings from package: imports',
defaultsTo: false, negatable: false)
- ..addFlag('show_sdk_warnings', help: 'Show warnings from SDK imports',
+ ..addFlag('show-sdk-warnings', help: 'Show warnings from SDK imports',
defaultsTo: false, negatable: false)
..addFlag('help', abbr: 'h', help: 'Display this help message',
defaultsTo: false, negatable: false);

Powered by Google App Engine
This is Rietveld 408576698