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

Unified Diff: pkg/analyzer_cli/lib/src/driver.dart

Issue 2559523005: Remove the AnalysisOptionsProcessor (Closed)
Patch Set: Created 4 years 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_cli/lib/src/boot_loader.dart ('k') | pkg/analyzer_cli/lib/src/plugin/plugin_manager.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer_cli/lib/src/driver.dart
diff --git a/pkg/analyzer_cli/lib/src/driver.dart b/pkg/analyzer_cli/lib/src/driver.dart
index b29e3abd9bc39bf60f73e106da403c830dcab370..9e6aab90281b52030de20894f96e26a10e347bd8 100644
--- a/pkg/analyzer_cli/lib/src/driver.dart
+++ b/pkg/analyzer_cli/lib/src/driver.dart
@@ -12,7 +12,6 @@ import 'package:analyzer/error/error.dart';
import 'package:analyzer/file_system/file_system.dart' as file_system;
import 'package:analyzer/file_system/file_system.dart';
import 'package:analyzer/file_system/physical_file_system.dart';
-import 'package:analyzer/plugin/options.dart';
import 'package:analyzer/plugin/resolver_provider.dart';
import 'package:analyzer/source/analysis_options_provider.dart';
import 'package:analyzer/source/package_map_provider.dart';
@@ -770,29 +769,21 @@ class Driver implements CommandLineStarter {
AnalysisContext context,
CommandLineOptions options) {
file_system.File file = _getOptionsFile(resourceProvider, options);
- List<OptionsProcessor> optionsProcessors =
- AnalysisEngine.instance.optionsPlugin.optionsProcessors;
- try {
- AnalysisOptionsProvider analysisOptionsProvider =
- new AnalysisOptionsProvider(sourceFactory);
- Map<String, YamlNode> optionMap =
- analysisOptionsProvider.getOptionsFromFile(file);
- optionsProcessors.forEach(
- (OptionsProcessor p) => p.optionsProcessed(context, optionMap));
-
- // Fill in lint rule defaults in case lints are enabled and rules are
- // not specified in an options file.
- if (options.lints && !containsLintRuleEntry(optionMap)) {
- setLints(context, linterPlugin.contributedRules);
- }
+ AnalysisOptionsProvider analysisOptionsProvider =
+ new AnalysisOptionsProvider(sourceFactory);
+ Map<String, YamlNode> optionMap =
+ analysisOptionsProvider.getOptionsFromFile(file);
- // Ask engine to further process options.
- if (optionMap != null) {
- configureContextOptions(context, optionMap);
- }
- } on Exception catch (e) {
- optionsProcessors.forEach((OptionsProcessor p) => p.onError(e));
+ // Fill in lint rule defaults in case lints are enabled and rules are
+ // not specified in an options file.
+ if (options.lints && !containsLintRuleEntry(optionMap)) {
+ setLints(context, linterPlugin.contributedRules);
+ }
+
+ // Ask engine to further process options.
+ if (optionMap != null) {
+ applyToAnalysisOptions(context.analysisOptions, optionMap);
}
}
}
« no previous file with comments | « pkg/analyzer_cli/lib/src/boot_loader.dart ('k') | pkg/analyzer_cli/lib/src/plugin/plugin_manager.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698