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

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

Issue 1414863004: Stop unwanted sharing between filter closures. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: 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/test/context_manager_test.dart » ('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 872020934cd2fc55b10bee288715feba2f5ad1e7..217fab75356e37d64f571c09c8858c1ed02c0d73 100644
--- a/pkg/analysis_server/lib/src/context_manager.dart
+++ b/pkg/analysis_server/lib/src/context_manager.dart
@@ -27,6 +27,7 @@ import 'package:analyzer/src/generated/java_engine.dart';
import 'package:analyzer/src/generated/java_io.dart';
import 'package:analyzer/src/generated/source.dart';
import 'package:analyzer/src/generated/source_io.dart';
+import 'package:analyzer/src/task/options.dart';
import 'package:package_config/packages.dart';
import 'package:package_config/packages_file.dart' as pkgfile show parse;
import 'package:package_config/src/packages_impl.dart' show MapPackages;
@@ -553,13 +554,13 @@ class ContextManagerImpl implements ContextManager {
// If codes are enumerated, collect them as filters; else leave filters
// empty to overwrite previous value.
if (codes is YamlMap) {
- String code, value;
+ String value;
codes.nodes.forEach((k, v) {
if (k is YamlScalar && v is YamlScalar) {
value = v.value?.toString()?.toLowerCase();
- if (value == 'false' || value == 'ignore') {
+ if (AnalyzerOptions.ignoreSynonyms.contains(value)) {
// Case-insensitive.
- code = k.value?.toString()?.toUpperCase();
+ String code = k.value?.toString()?.toUpperCase();
filters.add((AnalysisError error) => error.errorCode.name == code);
}
}
« no previous file with comments | « no previous file | pkg/analysis_server/test/context_manager_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698