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

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

Issue 1806263004: add --x-package-warnings-prefix option to dartanalyzer (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: oops, check in all the test files Created 4 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 | « pkg/analyzer_cli/lib/src/error_formatter.dart ('k') | pkg/analyzer_cli/lib/src/perf_report.dart » ('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 ec62ce34d8e5643a4014a4182c99baa8d2365498..3f100af10cbb788a4555e2ebf173e2cc21a9e78a 100644
--- a/pkg/analyzer_cli/lib/src/options.dart
+++ b/pkg/analyzer_cli/lib/src/options.dart
@@ -111,6 +111,9 @@ class CommandLineOptions {
/// Whether to show package: warnings
final bool showPackageWarnings;
+ /// If not null, show package: warnings only for matching packages.
+ final String showPackageWarningsPrefix;
+
/// Whether to show SDK warnings
final bool showSdkWarnings;
@@ -151,8 +154,10 @@ class CommandLineOptions {
packageRootPath = args['package-root'],
perfReport = args['x-perf-report'],
shouldBatch = args['batch'],
- showPackageWarnings =
- args['show-package-warnings'] || args['package-warnings'],
+ showPackageWarnings = args['show-package-warnings'] ||
+ args['package-warnings'] ||
+ args['x-package-warnings-prefix'] != null,
+ showPackageWarningsPrefix = args['x-package-warnings-prefix'],
showSdkWarnings = args['show-sdk-warnings'] || args['warnings'],
sourceFiles = args.rest,
warningsAreFatal = args['fatal-warnings'],
@@ -281,6 +286,10 @@ class CommandLineOptions {
help: 'Show warnings from SDK imports (deprecated).',
defaultsTo: false,
negatable: false)
+ ..addOption('x-package-warnings-prefix',
+ help:
+ 'Show warnings from package: imports that match the given prefix',
+ hide: true)
..addOption('x-perf-report',
help: 'Writes a performance report to the given file (experimental).')
..addFlag('help',
« no previous file with comments | « pkg/analyzer_cli/lib/src/error_formatter.dart ('k') | pkg/analyzer_cli/lib/src/perf_report.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698