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

Unified Diff: pkg/analyzer/lib/src/command_line/arguments.dart

Issue 2710323002: gracefully degrade if lints option not defined (Closed)
Patch Set: 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/lib/src/command_line/arguments.dart
diff --git a/pkg/analyzer/lib/src/command_line/arguments.dart b/pkg/analyzer/lib/src/command_line/arguments.dart
index 385b94b67803108d7407db66db92a12dff2251da..e0ab6761474ece69175ff18563183d37de7b8880 100644
--- a/pkg/analyzer/lib/src/command_line/arguments.dart
+++ b/pkg/analyzer/lib/src/command_line/arguments.dart
@@ -48,8 +48,12 @@ void applyAnalysisOptionFlags(AnalysisOptionsImpl options, ArgResults args) {
if (args.wasParsed(strongModeFlag)) {
options.strongMode = args[strongModeFlag];
}
- if (args.wasParsed(lintsFlag)) {
- options.lint = args[lintsFlag];
+ try {
+ if (args.wasParsed(lintsFlag)) {
+ options.lint = args[lintsFlag];
+ }
+ } on ArgumentError {
+ // lints were not defined - ignore and fall through
}
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698