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

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

Issue 2988343002: Initial support for an explicit plugin list (Closed)
Patch Set: Created 3 years, 4 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/lib/src/generated/engine.dart ('k') | pkg/analyzer/test/generated/engine_test.dart » ('j') | 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 ccae7d61a3b80958d74e322a0c40611bebf580ee..48343448ff4428825e9e54e427434e4d38754b63 100644
--- a/pkg/analyzer/lib/src/task/options.dart
+++ b/pkg/analyzer/lib/src/task/options.dart
@@ -516,6 +516,26 @@ class _OptionsProcessor {
// Process excludes.
var excludes = analyzer[AnalyzerOptions.exclude];
_applyExcludes(options, excludes);
+
+ // Process plugins.
+ var names = analyzer[AnalyzerOptions.plugins];
+ List<String> pluginNames = <String>[];
+ if (names is String) {
+ pluginNames.add(names);
+ } else if (names is YamlList) {
+ for (var element in names) {
+ if (element is String) {
+ pluginNames.add(element);
+ }
+ }
+ } else if (names is YamlMap) {
+ for (var key in names.keys) {
+ if (key is String) {
+ pluginNames.add(key);
+ }
+ }
+ }
+ options.enabledPluginNames = pluginNames;
}
LintConfig config = parseConfig(optionMap);
« no previous file with comments | « pkg/analyzer/lib/src/generated/engine.dart ('k') | pkg/analyzer/test/generated/engine_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698