mirror of
https://github.com/dart-lang/sdk
synced 2024-09-16 03:17:55 +00:00
Respect the rest of the analysis-based options
R=scheglov@google.com Review URL: https://codereview.chromium.org/2523833002 .
This commit is contained in:
parent
f1f036f018
commit
1767def635
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue