Skip to content

Commit aedd94f

Browse files
authored
Rollup merge of #108778 - jyn514:quiet-fmt, r=albertlarsan68
x fmt: Don't print all modified files if there's more than 10 This avoids spam for dozens of modified files. Fixes #106920.
2 parents ac258e9 + eb9b031 commit aedd94f

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/bootstrap/format.rs

+7-1
Original file line numberDiff line numberDiff line change
@@ -165,8 +165,14 @@ pub fn format(build: &Builder<'_>, check: bool, paths: &[PathBuf]) {
165165
if !CiEnv::is_ci() && paths.is_empty() {
166166
match get_modified_rs_files(build) {
167167
Ok(Some(files)) => {
168+
if files.len() <= 10 {
169+
for file in &files {
170+
println!("formatting modified file {file}");
171+
}
172+
} else {
173+
println!("formatting {} modified files", files.len());
174+
}
168175
for file in files {
169-
println!("formatting modified file {file}");
170176
ignore_fmt.add(&format!("/{file}")).expect(&file);
171177
}
172178
}

0 commit comments

Comments
 (0)