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

Unified Diff: pkg/analyzer_cli/lib/src/driver.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_cli/lib/src/driver.dart
diff --git a/pkg/analyzer_cli/lib/src/driver.dart b/pkg/analyzer_cli/lib/src/driver.dart
index aaff20d51fcc1dd446a8f850e0c764658a00b54a..e72435f901f9ecdd11b8c9e7587d4250595e166d 100644
--- a/pkg/analyzer_cli/lib/src/driver.dart
+++ b/pkg/analyzer_cli/lib/src/driver.dart
@@ -587,10 +587,10 @@ class Driver implements CommandLineStarter {
String dartSdkPath = options.dartSdkPath;
sdk = new DirectoryBasedDartSdk(new JavaFile(dartSdkPath));
sdk.useSummary = options.sourceFiles.every((String sourcePath) {
- sourcePath = path.absolute(sourcePath);
- sourcePath = path.normalize(sourcePath);
- return !path.isWithin(dartSdkPath, sourcePath);
- });
+ sourcePath = path.absolute(sourcePath);
+ sourcePath = path.normalize(sourcePath);
+ return !path.isWithin(dartSdkPath, sourcePath);
+ });
sdk.analysisOptions = context.analysisOptions;
}
}
@@ -661,6 +661,10 @@ class Driver implements CommandLineStarter {
} else {
filePath = AnalysisEngine.ANALYSIS_OPTIONS_FILE;
file = PhysicalResourceProvider.INSTANCE.getFile(filePath);
+ if (!file.exists) {
+ filePath = AnalysisEngine.ANALYSIS_OPTIONS_YAML_FILE;
+ file = PhysicalResourceProvider.INSTANCE.getFile(filePath);
+ }
}
return file;
}

Powered by Google App Engine
This is Rietveld 408576698