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

Unified Diff: pkg/analyzer/lib/src/task/options.dart

Issue 2523833002: Respect the rest of the analysis-based options (issue 27868) (Closed)
Patch Set: Created 4 years, 1 month 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/task/options.dart
diff --git a/pkg/analyzer/lib/src/task/options.dart b/pkg/analyzer/lib/src/task/options.dart
index dafb6d87d80bcee8a1d2f9892e59c4efbea7cfa8..5dfe1dc5d088e2926c5584cbd06086fef59ba46f 100644
--- a/pkg/analyzer/lib/src/task/options.dart
+++ b/pkg/analyzer/lib/src/task/options.dart
@@ -501,9 +501,17 @@ class _OptionsProcessor {
var strongMode = analyzer[AnalyzerOptions.strong_mode];
_applyStrongOptions(options, strongMode);
+ // Set filters.
+ var filters = analyzer[AnalyzerOptions.errors];
+ _applyProcessors(options, filters);
+
// Process language options.
var language = analyzer[AnalyzerOptions.language];
_applyLanguageOptions(options, language);
+
+ // Process excludes.
+ var excludes = analyzer[AnalyzerOptions.exclude];
+ _applyExcludes(options, excludes);
}
}
@@ -612,6 +620,15 @@ class _OptionsProcessor {
}
}
+ void _applyExcludes(AnalysisOptionsImpl options, Object excludes) {
+ if (excludes is YamlList) {
+ List<String> excludeList = toStringList(excludes);
+ if (excludeList != null) {
+ options.excludePatterns = excludeList;
+ }
+ }
+ }
+
void _applyLanguageOption(
AnalysisOptionsImpl options, Object feature, Object value) {
bool boolValue = toBool(value);
@@ -640,6 +657,11 @@ class _OptionsProcessor {
}
}
+ void _applyProcessors(AnalysisOptionsImpl options, Object codes) {
+ ErrorConfig config = new ErrorConfig(codes);
+ options.errorProcessors = config.processors;
+ }
+
void _applyStrongModeOption(
AnalysisOptionsImpl options, Object feature, Object value) {
bool boolValue = toBool(value);
« 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