mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-22 06:44:35 +00:00
Don't print all modified files if there's more than 10
This avoids spam for dozens of modified files.
This commit is contained in:
parent
5423745db8
commit
eb9b031232
@ -159,8 +159,14 @@ pub fn format(build: &Builder<'_>, check: bool, paths: &[PathBuf]) {
|
||||
if !check && paths.is_empty() {
|
||||
match get_modified_rs_files(build) {
|
||||
Ok(Some(files)) => {
|
||||
if files.len() <= 10 {
|
||||
for file in &files {
|
||||
println!("formatting modified file {file}");
|
||||
}
|
||||
} else {
|
||||
println!("formatting {} modified files", files.len());
|
||||
}
|
||||
for file in files {
|
||||
println!("formatting modified file {file}");
|
||||
ignore_fmt.add(&format!("/{file}")).expect(&file);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user