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

Unified Diff: pkg/analyzer/lib/src/plugin/plugin_configuration.dart

Issue 1392143002: Add context to OptionsProcessor callback API. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Arg reordering. Created 5 years, 2 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/plugin/options.dart ('k') | pkg/analyzer/lib/src/services/lint.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/lib/src/plugin/plugin_configuration.dart
diff --git a/pkg/analyzer/lib/src/plugin/plugin_configuration.dart b/pkg/analyzer/lib/src/plugin/plugin_configuration.dart
index 9bd0da3973901528cfd16527d788b9e1a3027240..9365a3c3eefe8a75fa4c31c718874ec12896077f 100644
--- a/pkg/analyzer/lib/src/plugin/plugin_configuration.dart
+++ b/pkg/analyzer/lib/src/plugin/plugin_configuration.dart
@@ -5,6 +5,7 @@
library analyzer.src.plugin.plugin_configuration;
import 'package:analyzer/plugin/options.dart';
+import 'package:analyzer/src/generated/engine.dart';
import 'package:yaml/yaml.dart';
const _analyzerOptionScope = 'analyzer';
@@ -38,9 +39,7 @@ Iterable<String> _parseHosts(dynamic yaml) {
if (yaml is String) {
hosts.add(yaml);
} else if (yaml is YamlList) {
- yaml.forEach((h) {
- hosts.add(_asString(h));
- });
+ yaml.forEach((h) => hosts.add(_asString(h)));
}
return hosts;
}
@@ -102,7 +101,8 @@ class PluginConfig {
// Anything but an empty list of plugins is treated as a format error.
if (pluginConfig != null) {
throw new PluginConfigFormatException(
- 'Unrecognized plugin config format, expected `YamlMap`, got `${pluginConfig.runtimeType}`',
+ 'Unrecognized plugin config format, expected `YamlMap`, '
+ 'got `${pluginConfig.runtimeType}`',
pluginConfig);
}
}
@@ -142,7 +142,8 @@ class PluginConfigOptionsProcessor extends OptionsProcessor {
}
@override
- void optionsProcessed(Map<String, YamlNode> options) {
+ void optionsProcessed(
+ AnalysisContext context, Map<String, YamlNode> options) {
_config = new PluginConfig.fromOptions(options);
}
}
« no previous file with comments | « pkg/analyzer/lib/plugin/options.dart ('k') | pkg/analyzer/lib/src/services/lint.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698