| Index: lib/src/driver.dart
|
| diff --git a/lib/src/driver.dart b/lib/src/driver.dart
|
| index 223db84b0596ff8cb50607d428c7808d51c6bf0a..793c5d429e9a9a31eaca43f8eb4428db8d8b347f 100644
|
| --- a/lib/src/driver.dart
|
| +++ b/lib/src/driver.dart
|
| @@ -25,10 +25,8 @@ import 'package:analyzer/src/generated/java_io.dart';
|
| import 'package:analyzer/src/generated/sdk_io.dart';
|
| import 'package:analyzer/src/generated/source.dart';
|
| import 'package:analyzer/src/generated/source_io.dart';
|
| -import 'package:analyzer/src/plugin/plugin_configuration.dart';
|
| import 'package:analyzer_cli/src/analyzer_impl.dart';
|
| import 'package:analyzer_cli/src/options.dart';
|
| -import 'package:analyzer_cli/src/plugin/plugin_config_processor_plugin.dart';
|
| import 'package:dev_compiler/strong_mode.dart';
|
| import 'package:linter/src/plugin/linter_plugin.dart';
|
| import 'package:package_config/discovery.dart' as pkgDiscovery;
|
| @@ -38,7 +36,6 @@ import 'package:package_config/src/packages_impl.dart' show MapPackages;
|
| import 'package:path/path.dart' as path;
|
| import 'package:plugin/manager.dart';
|
| import 'package:plugin/plugin.dart';
|
| -import 'package:source_span/source_span.dart';
|
| import 'package:yaml/yaml.dart';
|
|
|
| /// The maximum number of sources for which AST structures should be kept in the cache.
|
| @@ -57,23 +54,6 @@ StringSink outSink = stdout;
|
| typedef ErrorSeverity _BatchRunnerHandler(List<String> args);
|
|
|
| class Driver {
|
| - /// Emits an error message to [errorSink] if plugin config can't be read.
|
| - static final ErrorHandler _pluginConfigErrorHandler = (Exception e) {
|
| - String details;
|
| - if (e is PluginConfigFormatException) {
|
| - details = e.message;
|
| - var node = e.yamlNode;
|
| - if (node is YamlNode) {
|
| - SourceLocation location = node.span.start;
|
| - details += ' (line ${location.line}, column ${location.column})';
|
| - }
|
| - } else {
|
| - details = e.toString();
|
| - }
|
| -
|
| - errorSink.writeln('Plugin configuration skipped: $details');
|
| - };
|
| -
|
| /// The plugins that are defined outside the `analyzer_cli` package.
|
| List<Plugin> _userDefinedPlugins = <Plugin>[];
|
|
|
| @@ -84,9 +64,6 @@ class Driver {
|
| /// `null` if [_analyzeAll] hasn't been called yet.
|
| AnalysisContext _context;
|
|
|
| - /// Reads plugin config info from `.analysis_options`.
|
| - PluginConfigProcessorPlugin _pluginConfigProcessorPlugin;
|
| -
|
| /// The strong mode checker corresponding to [_context], or `null` if strong
|
| /// mode is not enabled or a context is not available yet.
|
| StrongChecker _strongChecker;
|
| @@ -95,18 +72,11 @@ class Driver {
|
| /// creation.
|
| CommandLineOptions _previousOptions;
|
|
|
| - Driver()
|
| - : _pluginConfigProcessorPlugin =
|
| - new PluginConfigProcessorPlugin(_pluginConfigErrorHandler);
|
| -
|
| /// This Driver's current analysis context.
|
| ///
|
| /// *Visible for testing.*
|
| AnalysisContext get context => _context;
|
|
|
| - /// Plugin configuration as processed from `.analysis_options`.
|
| - PluginConfig get pluginConfig => _pluginConfigProcessorPlugin.pluginConfig;
|
| -
|
| /// Set the [plugins] that are defined outside the `analyzer_cli` package.
|
| void set userDefinedPlugins(List<Plugin> plugins) {
|
| _userDefinedPlugins = plugins == null ? <Plugin>[] : plugins;
|
| @@ -484,7 +454,6 @@ class Driver {
|
|
|
| void _processPlugins() {
|
| List<Plugin> plugins = <Plugin>[];
|
| - plugins.add(_pluginConfigProcessorPlugin);
|
| plugins.add(linterPlugin);
|
| plugins.addAll(AnalysisEngine.instance.supportedPlugins);
|
| plugins.addAll(_userDefinedPlugins);
|
|
|