Skip to content

Commit b4a5f4c

Browse files
committed
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 ```
1 parent 35636f9 commit b4a5f4c

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
@@ -144,8 +144,10 @@ pub fn format(build: &Builder<'_>, check: bool, paths: &[PathBuf]) {
144144
let untracked_paths = untracked_paths_output
145145
.lines()
146146
.filter(|entry| entry.starts_with("??"))
147-
.map(|entry| {
148-
entry.split(' ').nth(1).expect("every git status entry should list a path")
147+
.filter_map(|entry| {
148+
let path =
149+
entry.split(' ').nth(1).expect("every git status entry should list a path");
150+
path.ends_with(".rs").then_some(path)
149151
});
150152
for untracked_path in untracked_paths {
151153
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)