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

Unified Diff: pkg/analyzer/test/src/context/builder_test.dart

Issue 2913493002: Add the analysis options path to the diagnostics page. (Closed)
Patch Set: move the root.optionsFilePath field to the ContextRoot class 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/test/src/context/builder_test.dart
diff --git a/pkg/analyzer/test/src/context/builder_test.dart b/pkg/analyzer/test/src/context/builder_test.dart
index 431c6fde99be5e0660cfa91e9e8869445c11fa84..9dfd14eba9f1dcfcc92fc1a5cfc994bda449a508 100644
--- a/pkg/analyzer/test/src/context/builder_test.dart
+++ b/pkg/analyzer/test/src/context/builder_test.dart
@@ -4,6 +4,7 @@
library analyzer.test.src.context.context_builder_test;
+import 'package:analyzer/context/context_root.dart';
import 'package:analyzer/file_system/file_system.dart';
import 'package:analyzer/file_system/memory_file_system.dart';
import 'package:analyzer/source/package_map_resolver.dart';
@@ -892,6 +893,23 @@ linter:
_expectEqualOptions(options, new AnalysisOptionsImpl());
}
+ void test_getAnalysisOptions_optionsPath() {
+ String path = resourceProvider.convertPath('/some/directory/path');
+ String filePath =
+ pathContext.join(path, AnalysisEngine.ANALYSIS_OPTIONS_YAML_FILE);
+ resourceProvider.newFile(
+ filePath,
+ '''
+linter:
+ rules:
+ - empty_constructor_bodies
+''');
+
+ ContextRoot root = new ContextRoot(path, []);
+ builder.getAnalysisOptions(path, contextRoot: root);
+ expect(root.optionsFilePath, equals(filePath));
+ }
+
void test_getAnalysisOptions_noDefault_overrides() {
AnalysisOptionsImpl expected = new AnalysisOptionsImpl();
expected.enableSuperMixins = true;
« pkg/analyzer/lib/src/context/builder.dart ('K') | « pkg/analyzer/lib/src/context/builder.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698