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

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

Issue 1392683003: Linter hookup into AS. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Merged 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/lib/src/server/driver.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 3935aea6cb6dab90526a7d38471e03fb15731a45..05a3fa108e7565c80e5091b328b664a66a1d35b2 100644
--- a/pkg/analysis_server/lib/src/context_manager.dart
+++ b/pkg/analysis_server/lib/src/context_manager.dart
@@ -22,6 +22,7 @@ import 'package:analyzer/source/path_filter.dart';
import 'package:analyzer/source/pub_package_map_provider.dart';
import 'package:analyzer/source/sdk_ext.dart';
import 'package:analyzer/src/generated/engine.dart';
+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';
@@ -820,17 +821,6 @@ class ContextManagerImpl implements ContextManager {
ContextInfo info = new ContextInfo(this, parent, folder, packagespecFile,
normalizedPackageRoots[folder.path]);
- try {
- Map<String, YamlNode> options =
- analysisOptionsProvider.getOptions(folder);
- processOptionsForContext(info, options);
- } catch (e) {
- // TODO(pquitslund): contribute plugin that sends error notification on options file.
- // Related test: context_manager_test.test_analysis_options_parse_failure()
- // AnalysisEngine.instance.optionsPlugin.optionsProcessors
- // .forEach((OptionsProcessor p) => p.onError(e));
- }
-
FolderDisposition disposition;
List<String> dependencies = <String>[];
@@ -843,6 +833,23 @@ class ContextManagerImpl implements ContextManager {
info.setDependencies(dependencies);
info.context = callbacks.addContext(folder, disposition);
info.context.name = folder.path;
+
+ try {
+ Map<String, YamlNode> options =
+ analysisOptionsProvider.getOptions(folder);
+ processOptionsForContext(info, options);
+ } catch (e, stacktrace) {
+ AnalysisEngine.instance.logger.logError(
+ 'Error processing .analysis_options',
+ new CaughtException(e, stacktrace));
+ // TODO(pquitslund): contribute plugin that sends error notification on
+ // options file.
+ // Related test:
+ // context_manager_test.test_analysis_options_parse_failure()
+ // AnalysisEngine.instance.optionsPlugin.optionsProcessors
+ // .forEach((OptionsProcessor p) => p.onError(e));
+ }
+
return info;
}
« no previous file with comments | « no previous file | pkg/analysis_server/lib/src/server/driver.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698