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

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

Issue 1412213003: Register .analysis_options files for analysis. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 2 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/analyzer/lib/source/analysis_options_provider.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 1531cf31655b41f12d5d7cf079604455d13ba6d1..acb156e2a509cf22537e092909c7a62b1f7474cc 100644
--- a/pkg/analyzer/lib/src/generated/engine.dart
+++ b/pkg/analyzer/lib/src/generated/engine.dart
@@ -21,6 +21,7 @@ import 'package:analyzer/task/dart.dart';
import 'package:analyzer/task/model.dart' as newContext;
import 'package:analyzer/task/model.dart';
import 'package:html/dom.dart' show Document;
+import 'package:path/path.dart' as pathos;
import 'package:plugin/manager.dart';
import 'package:plugin/plugin.dart';
@@ -5875,6 +5876,11 @@ class AnalysisEngine {
static const String SUFFIX_HTML = "html";
/**
+ * The file name used for analysis options files.
+ */
+ static const String ANALYSIS_OPTIONS_FILE = '.analysis_options';
+
+ /**
* The unique instance of this class.
*/
static final AnalysisEngine instance = new AnalysisEngine._();
@@ -6043,6 +6049,18 @@ class AnalysisEngine {
}
/**
+ * Return `true` if the given [fileName] is an analysis options file.
+ */
+ static bool isAnalysisOptionsFileName(String fileName,
+ [pathos.Context context]) {
+ if (fileName == null) {
+ return false;
+ }
+ return (context ?? pathos.posix).basename(fileName) ==
+ ANALYSIS_OPTIONS_FILE;
+ }
+
+ /**
* Return `true` if the given [fileName] is assumed to contain Dart source
* code.
*/
« no previous file with comments | « pkg/analyzer/lib/source/analysis_options_provider.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698