| Index: pkg/analysis_server/lib/src/context_manager.dart
|
| diff --git a/pkg/analysis_server/lib/src/context_manager.dart b/pkg/analysis_server/lib/src/context_manager.dart
|
| index d212191070402a0b2413c742511e94f0b08e8279..7c167f942cfcada298fbb2b04d4beb993a9de241 100644
|
| --- a/pkg/analysis_server/lib/src/context_manager.dart
|
| +++ b/pkg/analysis_server/lib/src/context_manager.dart
|
| @@ -22,7 +22,6 @@ import 'package:analyzer/source/pub_package_map_provider.dart';
|
| import 'package:analyzer/source/sdk_ext.dart';
|
| import 'package:analyzer/src/context/context.dart' as context;
|
| import 'package:analyzer/src/generated/engine.dart';
|
| -import 'package:analyzer/src/generated/error.dart';
|
| import 'package:analyzer/src/generated/java_engine.dart';
|
| import 'package:analyzer/src/generated/java_io.dart';
|
| import 'package:analyzer/src/generated/source.dart';
|
| @@ -507,25 +506,13 @@ class ContextManagerImpl implements ContextManager {
|
| return;
|
| }
|
|
|
| - // Set strong mode (default is false).
|
| - bool strongMode = analyzer[AnalyzerOptions.strong_mode] ?? false;
|
| - AnalysisContext context = info.context;
|
| - if (context.analysisOptions.strongMode != strongMode) {
|
| - AnalysisOptionsImpl options =
|
| - new AnalysisOptionsImpl.from(context.analysisOptions);
|
| - options.strongMode = strongMode;
|
| - context.analysisOptions = options;
|
| - }
|
| + configureContextOptions(info.context, options);
|
|
|
| // Set ignore patterns.
|
| YamlList exclude = analyzer[AnalyzerOptions.exclude];
|
| if (exclude != null) {
|
| setIgnorePatternsForContext(info, exclude);
|
| }
|
| -
|
| - // Set filters.
|
| - YamlNode filters = analyzer[AnalyzerOptions.errors];
|
| - setFiltersForContext(info, filters);
|
| }
|
|
|
| @override
|
| @@ -549,26 +536,6 @@ class ContextManagerImpl implements ContextManager {
|
| setRoots(includedPaths, excludedPaths, packageRoots);
|
| }
|
|
|
| - void setFiltersForContext(ContextInfo info, YamlNode codes) {
|
| - List<ErrorFilter> filters = <ErrorFilter>[];
|
| - // If codes are enumerated, collect them as filters; else leave filters
|
| - // empty to overwrite previous value.
|
| - if (codes is YamlMap) {
|
| - String value;
|
| - codes.nodes.forEach((k, v) {
|
| - if (k is YamlScalar && v is YamlScalar) {
|
| - value = v.value?.toString()?.toLowerCase();
|
| - if (AnalyzerOptions.ignoreSynonyms.contains(value)) {
|
| - // Case-insensitive.
|
| - String code = k.value?.toString()?.toUpperCase();
|
| - filters.add((AnalysisError error) => error.errorCode.name == code);
|
| - }
|
| - }
|
| - });
|
| - }
|
| - info.context.setConfigurationData(CONFIGURED_ERROR_FILTERS, filters);
|
| - }
|
| -
|
| /**
|
| * Sets the [ignorePatterns] for the context having info [info].
|
| */
|
|
|