Skip to content

Commit eb9b031

Browse files
committed
Don't print all modified files if there's more than 10
This avoids spam for dozens of modified files.
1 parent 5423745 commit eb9b031

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
@@ -159,8 +159,14 @@ pub fn format(build: &Builder<'_>, check: bool, paths: &[PathBuf]) {
159159
if !check && paths.is_empty() {
160160
match get_modified_rs_files(build) {
161161
Ok(Some(files)) => {
162+
if files.len() <= 10 {
163+
for file in &files {
164+
println!("formatting modified file {file}");
165+
}
166+
} else {
167+
println!("formatting {} modified files", files.len());
168+
}
162169
for file in files {
163-
println!("formatting modified file {file}");
164170
ignore_fmt.add(&format!("/{file}")).expect(&file);
165171
}
166172
}

0 commit comments

Comments
 (0)