Skip to content

Commit c08c69b

Browse files
authored
Rollup merge of #108776 - jyn514:quiet-tidy, r=ozkanonur
Make `x test tidy` less noisy Before: ``` Building tool tidy (stage0) Finished release [optimized + debuginfo] target(s) in 0.29s fmt check skip untracked path chrome_profiler.json during rustfmt invocations skip untracked path query_impl-default,args.mm_profdata during rustfmt invocations skip untracked path query_impl-llvm.txt during rustfmt invocations skip untracked path query_impl-mono_items.txt during rustfmt invocations skip untracked path query_impl-summarize.txt during rustfmt invocations skip untracked path rustc.svg during rustfmt invocations skip untracked path rustc_middle.mono_items.json during rustfmt invocations skip untracked path rustc_middle.mono_items.md during rustfmt invocations skip untracked path rustc_query_impl.mono_items-thread_local_attr.json during rustfmt invocations skip untracked path rustc_query_impl.mono_items-thread_local_macro.json during rustfmt invocations skip untracked path rustc_query_impl.mono_items.md during rustfmt invocations tidy check Found 505 error codes Highest error code: `E0793` * 397 features Ensuring the YAML anchors in the GitHub Actions config were expanded Building tool expand-yaml-anchors (stage0) Finished release [optimized + debuginfo] target(s) in 0.14s Build completed successfully in 0:00:54 ``` After: ``` Building tool tidy (stage0) Finished release [optimized + debuginfo] target(s) in 2.24s fmt check tidy check Ensuring the YAML anchors in the GitHub Actions config were expanded Building tool expand-yaml-anchors (stage0) Finished release [optimized + debuginfo] target(s) in 0.14s Build completed successfully in 0:00:04 ```
2 parents 5c49f08 + b4a5f4c commit c08c69b

File tree

3 files changed

+8
-6
lines changed

3 files changed

+8
-6
lines changed

src/bootstrap/format.rs

+4-2
Original file line numberDiff line numberDiff line change
@@ -145,8 +145,10 @@ pub fn format(build: &Builder<'_>, check: bool, paths: &[PathBuf]) {
145145
let untracked_paths = untracked_paths_output
146146
.lines()
147147
.filter(|entry| entry.starts_with("??"))
148-
.map(|entry| {
149-
entry.split(' ').nth(1).expect("every git status entry should list a path")
148+
.filter_map(|entry| {
149+
let path =
150+
entry.split(' ').nth(1).expect("every git status entry should list a path");
151+
path.ends_with(".rs").then_some(path)
150152
});
151153
for untracked_path in untracked_paths {
152154
println!("skip untracked path {} during rustfmt invocations", untracked_path);

src/tools/tidy/src/error_codes.rs

+4-2
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,10 @@ pub fn check(root_path: &Path, search_paths: &[&Path], verbose: bool, bad: &mut
4646

4747
// Stage 1: create list
4848
let error_codes = extract_error_codes(root_path, &mut errors);
49-
println!("Found {} error codes", error_codes.len());
50-
println!("Highest error code: `{}`", error_codes.iter().max().unwrap());
49+
if verbose {
50+
println!("Found {} error codes", error_codes.len());
51+
println!("Highest error code: `{}`", error_codes.iter().max().unwrap());
52+
}
5153

5254
// Stage 2: check list has docs
5355
let no_longer_emitted = check_error_codes_docs(root_path, &error_codes, &mut errors, verbose);

src/tools/tidy/src/features.rs

-2
Original file line numberDiff line numberDiff line change
@@ -219,8 +219,6 @@ pub fn check(
219219
for line in lines {
220220
println!("* {line}");
221221
}
222-
} else {
223-
println!("* {} features", features.len());
224222
}
225223

226224
CollectedFeatures { lib: lib_features, lang: features }

0 commit comments

Comments
 (0)