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

Unified Diff: pkg/analyzer/lib/src/context/builder.dart

Issue 2913493002: Add the analysis options path to the diagnostics page. (Closed)
Patch Set: Created 3 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/context/builder.dart
diff --git a/pkg/analyzer/lib/src/context/builder.dart b/pkg/analyzer/lib/src/context/builder.dart
index 0b300e585e123bcdf0d72df4fe77e0f1b7ac02ca..c5eb63442cc9fd8c1ddc3e269d287296bdf7fe04 100644
--- a/pkg/analyzer/lib/src/context/builder.dart
+++ b/pkg/analyzer/lib/src/context/builder.dart
@@ -407,10 +407,12 @@ class ContextBuilder {
AnalysisOptionsImpl options = createDefaultOptions();
File optionsFile = getOptionsFile(path);
Map<String, YamlNode> optionMap;
+ String optionsFilePath;
if (optionsFile != null) {
try {
optionMap = optionsProvider.getOptionsFromFile(optionsFile);
+ optionsFilePath = optionsFile.path;
verbose('Loaded analysis options from ${optionsFile.path}');
} catch (e) {
// Ignore exceptions thrown while trying to load the options file.
@@ -431,6 +433,7 @@ class ContextBuilder {
if (source != null && source.exists()) {
try {
optionMap = optionsProvider.getOptionsFromSource(source);
+ optionsFilePath = source.fullName;
verbose('Loaded analysis options from ${source.fullName}');
} catch (e) {
// Ignore exceptions thrown while trying to load the options file.
@@ -442,6 +445,7 @@ class ContextBuilder {
if (optionMap != null) {
applyToAnalysisOptions(options, optionMap);
+ options.optionsFilePath = optionsFilePath;
if (builderOptions.argResults != null) {
applyAnalysisOptionFlags(options, builderOptions.argResults,
verbosePrint: verbosePrint);

Powered by Google App Engine
This is Rietveld 408576698