Version 2.13.0-89.0.dev
Merge commit '3268bd04296343747a27af9e9cd0169be91aed37' into 'dev'
diff --git a/pkg/analyzer/lib/src/dart/analysis/context_root.dart b/pkg/analyzer/lib/src/dart/analysis/context_root.dart
index 6ef4330..62b1e88 100644
--- a/pkg/analyzer/lib/src/dart/analysis/context_root.dart
+++ b/pkg/analyzer/lib/src/dart/analysis/context_root.dart
@@ -107,7 +107,7 @@
bool _isExcluded(String path) {
Context context = resourceProvider.pathContext;
- for (var current = path; current != root.path;) {
+ for (var current = path; root.contains(current);) {
if (context.basename(current).startsWith('.')) {
return true;
}
diff --git a/pkg/analyzer/test/src/dart/analysis/context_root_test.dart b/pkg/analyzer/test/src/dart/analysis/context_root_test.dart
index 39eaf04..751546a 100644
--- a/pkg/analyzer/test/src/dart/analysis/context_root_test.dart
+++ b/pkg/analyzer/test/src/dart/analysis/context_root_test.dart
@@ -106,6 +106,19 @@
expect(_isAnalyzed(contextRoot, 'lib/.bar/a.dart'), isFalse);
}
+ /// https://github.com/flutter/flutter/issues/76911
+ test_isAnalyzed_implicitlyExcluded_dotFolder_windows() {
+ if (resourceProvider.pathContext.rootPrefix(rootPath) == r'C:\') {
+ var truePath = convertPath('/test/root/lib/a.dart');
+ expect(contextRoot.isAnalyzed(truePath), isTrue);
+ expect(contextRoot.isAnalyzed(truePath.toLowerCase()), isTrue);
+
+ var falsePath = convertPath('/test/root/.foo/a.dart');
+ expect(contextRoot.isAnalyzed(falsePath), isFalse);
+ expect(contextRoot.isAnalyzed(falsePath.toLowerCase()), isFalse);
+ }
+ }
+
test_isAnalyzed_included() {
String filePath = convertPath('/test/root/lib/root.dart');
expect(contextRoot.isAnalyzed(filePath), isTrue);
diff --git a/tools/VERSION b/tools/VERSION
index fa72651..0dbc0f2 100644
--- a/tools/VERSION
+++ b/tools/VERSION
@@ -27,5 +27,5 @@
MAJOR 2
MINOR 13
PATCH 0
-PRERELEASE 88
+PRERELEASE 89
PRERELEASE_PATCH 0
\ No newline at end of file