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

Unified Diff: pkg/analyzer/lib/src/generated/engine.dart

Issue 1975963002: Support the name analysis_options.yaml for analysis options files (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 4 years, 7 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/analyzer/lib/src/generated/engine.dart
diff --git a/pkg/analyzer/lib/src/generated/engine.dart b/pkg/analyzer/lib/src/generated/engine.dart
index 8db8ee0c418e92cb41211998939eed66d53ffbbb..972043a4e6d9654371143e050956833dafaca99c 100644
--- a/pkg/analyzer/lib/src/generated/engine.dart
+++ b/pkg/analyzer/lib/src/generated/engine.dart
@@ -729,11 +729,16 @@ class AnalysisEngine {
static const String SUFFIX_HTML = "html";
/**
- * The file name used for analysis options files.
+ * The deprecated file name used for analysis options files.
*/
static const String ANALYSIS_OPTIONS_FILE = '.analysis_options';
/**
+ * The file name used for analysis options files.
+ */
+ static const String ANALYSIS_OPTIONS_YAML_FILE = 'analysis_options.yaml';
+
+ /**
* The unique instance of this class.
*/
static final AnalysisEngine instance = new AnalysisEngine._();
@@ -876,8 +881,9 @@ class AnalysisEngine {
if (fileName == null) {
return false;
}
- return (context ?? pathos.posix).basename(fileName) ==
- ANALYSIS_OPTIONS_FILE;
+ String basename = (context ?? pathos.posix).basename(fileName);
+ return basename == ANALYSIS_OPTIONS_FILE ||
+ basename == ANALYSIS_OPTIONS_YAML_FILE;
}
/**

Powered by Google App Engine
This is Rietveld 408576698