commit | ca540d8620d078962767b439951a8ea4681f7bcd | [log] [tgz] |
---|---|---|
author | Jens Johansen <jensj@google.com> | Wed Jan 22 01:38:42 2025 -0800 |
committer | Commit Queue <dart-scoped@luci-project-accounts.iam.gserviceaccount.com> | Wed Jan 22 01:38:42 2025 -0800 |
tree | ee8e184c6741293c1f648fdb3091d53979cee07e | |
parent | 9233056319e96d0bfb242cebeddc9204f00f5f11 [diff] |
[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 <jensj@google.com> Reviewed-by: Johnni Winther <johnniwinther@google.com>
diff --git a/pkg/front_end/test/compile_and_lint_impl.dart b/pkg/front_end/test/compile_and_lint_impl.dart index 46d4ec3..c5abe2f 100644 --- a/pkg/front_end/test/compile_and_lint_impl.dart +++ b/pkg/front_end/test/compile_and_lint_impl.dart
@@ -82,6 +82,14 @@ } } + // If we filtered everything away (e.g. only changed files in an ignored + // directory) we shouldn't try to run. + // It will fail and also doesn't make sense. + if (includedFilesFiltered.isEmpty) { + // 0 = no errors found. + return 0; + } + Stopwatch stopwatch = new Stopwatch()..start(); // TODO(jensj): The target has to be VM or we can't compile the sdk,