Skip to content

Commit 49636a1

Browse files
committed
tidy: assume all files are modified in CI
1 parent bd9624d commit 49636a1

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/tools/tidy/src/lib.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,10 @@ pub fn git_diff<S: AsRef<OsStr>>(base_commit: &str, extra_arg: S) -> Option<Stri
126126

127127
/// Returns true if any modified file matches the predicate, if we are in CI, or if unable to list modified files.
128128
pub fn files_modified(ci_info: &CiInfo, pred: impl Fn(&str) -> bool) -> bool {
129+
if CiEnv::is_ci() {
130+
// assume everything is modified on CI because we really don't want false positives there.
131+
return true;
132+
}
129133
let Some(base_commit) = &ci_info.base_commit else {
130134
eprintln!("No base commit, assuming all files are modified");
131135
return true;

0 commit comments

Comments
 (0)