Skip to content

Commit

Permalink
Rollup merge of #108778 - jyn514:quiet-fmt, r=albertlarsan68
Browse files Browse the repository at this point in the history
x fmt: Don't print all modified files if there's more than 10

This avoids spam for dozens of modified files.

Fixes #106920.
  • Loading branch information
matthiaskrgr authored Mar 9, 2023
2 parents ac258e9 + eb9b031 commit aedd94f
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/bootstrap/format.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)) => {
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);
}
}
Expand Down

0 comments on commit aedd94f

Please sign in to comment.