about summary refs log tree commit diff
path: root/src/bootstrap
diff options
context:
space:
mode:
authorJoshua Nelson <github@jyn.dev>2023-03-05 14:49:29 +0000
committerJoshua Nelson <github@jyn.dev>2023-03-05 14:49:29 +0000
commitb4a5f4c22101110720d666bcf213dff84e58ee92 (patch)
tree0a2b6c6b196b1158806044720db881142642fe16 /src/bootstrap
parent35636f9459720513ca4ed19373a4a7c9e0ea3c46 (diff)
downloadrust-b4a5f4c22101110720d666bcf213dff84e58ee92.tar.gz
rust-b4a5f4c22101110720d666bcf213dff84e58ee92.zip
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
```
Diffstat (limited to 'src/bootstrap')
-rw-r--r--src/bootstrap/format.rs6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/bootstrap/format.rs b/src/bootstrap/format.rs
index 6d5753e8a6d..f7b5fc5656a 100644
--- a/src/bootstrap/format.rs
+++ b/src/bootstrap/format.rs
@@ -144,8 +144,10 @@ pub fn format(build: &Builder<'_>, check: bool, paths: &[PathBuf]) {
             let untracked_paths = untracked_paths_output
                 .lines()
                 .filter(|entry| entry.starts_with("??"))
-                .map(|entry| {
-                    entry.split(' ').nth(1).expect("every git status entry should list a path")
+                .filter_map(|entry| {
+                    let path =
+                        entry.split(' ').nth(1).expect("every git status entry should list a path");
+                    path.ends_with(".rs").then_some(path)
                 });
             for untracked_path in untracked_paths {
                 println!("skip untracked path {} during rustfmt invocations", untracked_path);