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

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

Issue 2844663003: Fix some issues with options handling (Closed)
Patch Set: Created 3 years, 8 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 | « pkg/analyzer_cli/lib/src/driver.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 7e8b9cbb5269cfad824d05dfdab572fdaf7e034d..2e4a3f6bee84ce57ff5f9ee2d941ec9d7c2c89c0 100644
--- a/pkg/analyzer_cli/lib/src/options.dart
+++ b/pkg/analyzer_cli/lib/src/options.dart
@@ -225,6 +225,14 @@ class CommandLineOptions {
String get packageRootPath =>
contextBuilderOptions.defaultPackagesDirectoryPath;
+ /// The source files to analyze
+ List<String> get sourceFiles => _sourceFiles;
+
+ /// Replace the sourceFiles parsed from the command line.
+ void rewriteSourceFiles(List<String> newSourceFiles) {
+ _sourceFiles = newSourceFiles;
+ }
+
/// Parse [args] into [CommandLineOptions] describing the specified
/// analyzer options. In case of a format error, calls [printAndFail], which
/// by default prints an error message to stderr and exits.
@@ -294,14 +302,6 @@ class CommandLineOptions {
return options;
}
- /// The source files to analyze
- List<String> get sourceFiles => _sourceFiles;
-
- /// Replace the sourceFiles parsed from the command line.
- void rewriteSourceFiles(List<String> newSourceFiles) {
- _sourceFiles = newSourceFiles;
- }
-
static String _getVersion() {
try {
// This is relative to bin/snapshot, so ../..
@@ -484,7 +484,7 @@ class CommandLineOptions {
hide: hide)
..addFlag('enable-assert-initializers',
help: 'Enable parsing of asserts in constructor initializers.',
- defaultsTo: false,
+ defaultsTo: null,
negatable: false,
hide: hide)
..addFlag('use-analysis-driver-memory-byte-store',
« no previous file with comments | « pkg/analyzer_cli/lib/src/driver.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698