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

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

Issue 1403983002: AS strong-mode .analysis_options awareness. (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
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 05a3fa108e7565c80e5091b328b664a66a1d35b2..2720aa79eec3be7aca8355063f87df6c146ab9b2 100644
--- a/pkg/analysis_server/lib/src/context_manager.dart
+++ b/pkg/analysis_server/lib/src/context_manager.dart
@@ -484,6 +484,16 @@ class ContextManagerImpl implements ContextManager {
return;
}
+ // Set strong mode.
+ var strongMode = analyzer['strong-mode'];
+ if (strongMode != null && strongMode == true) {
Brian Wilkerson 2015/10/13 20:12:02 The expression "strongMode != null" isn't necessar
+ AnalysisContext context = info.context;
+ AnalysisOptionsImpl options =
+ new AnalysisOptionsImpl.from(context.analysisOptions);
+ options.strongMode = true;
Jennifer Messerly 2015/10/13 20:00:28 we had an issue at some point where we also needed
pquitslund 2015/10/13 20:10:58 Oh! Interesting. Leaf/Brian?
Brian Wilkerson 2015/10/13 20:12:02 I don't remember. But eventually, to support this
Leaf 2015/10/13 20:20:38 Will we be analyzing the SDK in strong mode with t
Jennifer Messerly 2015/10/13 20:20:54 yeah. I guess this isn't a big issue yet, until we
+ context.analysisOptions = options;
+ }
+
// Set ignore patterns.
YamlList exclude = analyzer['exclude'];
if (exclude != null) {
« no previous file with comments | « no previous file | pkg/analysis_server/test/context_manager_test.dart » ('j') | pkg/analysis_server/test/context_manager_test.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698