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

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

Issue 1832643002: Allow Analysis Server crawl up the folders to search .analysis_options file. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 9 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 4ce26ae17d3688c44a5fee768c06dacba82fe77c..fc2573c3f27d0948e2a058e526c54035a4b8b142 100644
--- a/pkg/analysis_server/lib/src/context_manager.dart
+++ b/pkg/analysis_server/lib/src/context_manager.dart
@@ -637,13 +637,13 @@ class ContextManagerImpl implements ContextManager {
}
/**
- * Return the options from the analysis options file in the given [folder], or
- * `null` if there is no file in the folder or if the contents of the file are
- * not valid YAML.
+ * Return the options from the analysis options file in the given [folder]
+ * if exists, or in one of the parent folders, or `null` if no analysis
+ * options file is found or if the contents of the file are not valid YAML.
*/
Map<String, Object> readOptions(Folder folder) {
try {
- return analysisOptionsProvider.getOptions(folder);
+ return analysisOptionsProvider.getOptions(folder, crawlUp: true);
} catch (_) {
// Parse errors are reported by GenerateOptionsErrorsTask.
}

Powered by Google App Engine
This is Rietveld 408576698