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

Unified Diff: pkg/analysis_server/lib/src/context_manager.dart

Issue 1423333002: Option support for `enableSuperMixins` (and more). (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Merge with master. 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 | « no previous file | pkg/analysis_server/pubspec.yaml » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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].
*/
« no previous file with comments | « no previous file | pkg/analysis_server/pubspec.yaml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698