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

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

Issue 2720493002: cleanup --batch-mode sourceFiles (Closed)
Patch Set: merge 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
« no previous file with comments | « pkg/analyzer_cli/lib/src/build_mode.dart ('k') | pkg/pkg.status » ('j') | 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 957910a1e368c306f99b20b998e77954753930ec..f93d5f6e62ffe6cc4769df893ccf81d87f3f5bcd 100644
--- a/pkg/analyzer_cli/lib/src/options.dart
+++ b/pkg/analyzer_cli/lib/src/options.dart
@@ -120,7 +120,7 @@ class CommandLineOptions {
final bool showSdkWarnings;
/// The source files to analyze
- final List<String> sourceFiles;
+ List<String> _sourceFiles;
/// Whether to treat warnings as fatal
final bool warningsAreFatal;
@@ -173,7 +173,7 @@ class CommandLineOptions {
args['x-package-warnings-prefix'] != null,
showPackageWarningsPrefix = args['x-package-warnings-prefix'],
showSdkWarnings = args['sdk-warnings'],
- sourceFiles = args.rest,
+ _sourceFiles = args.rest,
warningsAreFatal = args['fatal-warnings'],
strongMode = args['strong'],
implicitCasts = !args['no-implicit-casts'],
@@ -259,6 +259,14 @@ 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 ../..
« no previous file with comments | « pkg/analyzer_cli/lib/src/build_mode.dart ('k') | pkg/pkg.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698