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 https://github.com/rust-lang/rust/issues/106920.
This commit is contained in:
commit
aedd94fcab
1 changed files with 7 additions and 1 deletions
|
@ -165,8 +165,14 @@ pub fn format(build: &Builder<'_>, check: bool, paths: &[PathBuf]) {
|
|||
if !CiEnv::is_ci() && paths.is_empty() {
|
||||
match get_modified_rs_files(build) {
|
||||
Ok(Some(files)) => {
|
||||
for file in 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 {
|
||||
ignore_fmt.add(&format!("/{file}")).expect(&file);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue