Skip to content

Commit ca540d8

Browse files
jensjohaCommit Queue
authored andcommitted
[CFE] Fix presubmit compile-and-lint when all changed files are filtered away
Change-Id: I1437755c7c2ef137a3fa37b3f0ec694ea8ab76dc Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/405340 Commit-Queue: Jens Johansen <[email protected]> Reviewed-by: Johnni Winther <[email protected]>
1 parent 9233056 commit ca540d8

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

pkg/front_end/test/compile_and_lint_impl.dart

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,14 @@ Future<int> runCompileAndLintTest(
8282
}
8383
}
8484

85+
// If we filtered everything away (e.g. only changed files in an ignored
86+
// directory) we shouldn't try to run.
87+
// It will fail and also doesn't make sense.
88+
if (includedFilesFiltered.isEmpty) {
89+
// 0 = no errors found.
90+
return 0;
91+
}
92+
8593
Stopwatch stopwatch = new Stopwatch()..start();
8694

8795
// TODO(jensj): The target has to be VM or we can't compile the sdk,

0 commit comments

Comments
 (0)