File tree Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -334,6 +334,7 @@ class CachedBuildRunner {
334
334
);
335
335
336
336
dependencies.addAll (importDependency);
337
+ testFiles.add (dependencies);
337
338
}
338
339
}
339
340
Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ class DependencyVisitor {
17
17
final withRegex = RegExp (r"with\s+([\w\s,]+)" );
18
18
19
19
/// Regex for parsing import statements
20
- final importRegex = RegExp (r'''import\s+(?!'package: )(?:'|")(.*?)('|");?''' );
20
+ final relativeImportRegex = RegExp (r'''import\s+(?!(\w+:) )(?:'|")(.*?)('|");?''' );
21
21
final packageImportRegex = RegExp (
22
22
'import\\ s+\' package:${Utils .appPackageName }(.*)\' ;' ,
23
23
);
@@ -76,13 +76,15 @@ class DependencyVisitor {
76
76
final lines = dartSource.split ('\n ' );
77
77
78
78
for (final line in lines) {
79
- final relativeMatch = importRegex .firstMatch (line);
79
+ final relativeMatch = relativeImportRegex .firstMatch (line);
80
80
final packageMatch = packageImportRegex.firstMatch (line);
81
81
82
82
if (relativeMatch != null ) {
83
83
final importedPath = relativeMatch.group (1 );
84
84
if (importedPath != null ) relativeImports.add (importedPath);
85
- } else if (packageMatch != null ) {
85
+ }
86
+
87
+ if (packageMatch != null ) {
86
88
final importedPath = packageMatch.group (1 );
87
89
if (importedPath != null ) absoluteImports.add (importedPath);
88
90
}
You can’t perform that action at this time.
0 commit comments