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

Unified Diff: pkg/analysis_server/lib/src/status/get_handler2.dart

Issue 2913493002: Add the analysis options path to the diagnostics page. (Closed)
Patch Set: Merge branch 'master' into options_in_diagnostics 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
« no previous file with comments | « pkg/analysis_server/lib/src/context_manager.dart ('k') | pkg/analyzer/lib/context/context_root.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analysis_server/lib/src/status/get_handler2.dart
diff --git a/pkg/analysis_server/lib/src/status/get_handler2.dart b/pkg/analysis_server/lib/src/status/get_handler2.dart
index 7d9b785c88fabc32816981c44fd002c0c23ae6aa..46b5a06dc0ad463dc61cabc93f860fd71955278d 100644
--- a/pkg/analysis_server/lib/src/status/get_handler2.dart
+++ b/pkg/analysis_server/lib/src/status/get_handler2.dart
@@ -7,7 +7,8 @@ import 'dart:io';
import 'dart:math';
import 'package:analysis_server/protocol/protocol.dart';
-import 'package:analysis_server/protocol/protocol_generated.dart';
+import 'package:analysis_server/protocol/protocol_generated.dart'
+ hide AnalysisOptions;
import 'package:analysis_server/src/analysis_server.dart';
import 'package:analysis_server/src/domain_completion.dart';
import 'package:analysis_server/src/domain_diagnostic.dart';
@@ -470,10 +471,12 @@ class GetHandler2 implements AbstractGetHandler {
(StringBuffer buffer) {
buffer.write('<h3>Configuration</h3>');
+ AnalysisOptions analysisOptions = driver.analysisOptions;
+
_writeColumns(buffer, <HtmlGenerator>[
(StringBuffer buffer) {
buffer.write('<p><b>Context Options</b></p>');
- writeOptions(buffer, driver.analysisOptions);
+ writeOptions(buffer, analysisOptions);
},
(StringBuffer buffer) {
buffer.write('<p><b>SDK Context Options</b></p>');
@@ -486,7 +489,7 @@ class GetHandler2 implements AbstractGetHandler {
});
},
(StringBuffer buffer) {
- List<Linter> lints = driver.analysisOptions.lintRules;
+ List<Linter> lints = analysisOptions.lintRules;
buffer.write('<p><b>Lints</b></p>');
if (lints.isEmpty) {
buffer.write('<p>none</p>');
@@ -499,13 +502,26 @@ class GetHandler2 implements AbstractGetHandler {
}
List<ErrorProcessor> errorProcessors =
- driver.analysisOptions.errorProcessors;
+ analysisOptions.errorProcessors;
int processorCount = errorProcessors?.length ?? 0;
buffer
.write('<p><b>Error Processor count</b>: $processorCount</p>');
}
]);
+ _writeColumns(buffer, <HtmlGenerator>[
+ (StringBuffer buffer) {
+ buffer.write('<p><b>analysis_options path</b></p>');
+
+ if (driver.contextRoot.optionsFilePath != null) {
+ buffer.write(
+ '<p>${HTML_ESCAPE.convert(driver.contextRoot.optionsFilePath)}</p>');
+ } else {
+ buffer.write('<p>none</p>');
+ }
+ }
+ ]);
+
SourceFactory sourceFactory = driver.sourceFactory;
if (sourceFactory is SourceFactoryImpl) {
buffer.write('<h3>Resolvers</h3>');
« no previous file with comments | « pkg/analysis_server/lib/src/context_manager.dart ('k') | pkg/analyzer/lib/context/context_root.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698