diff options
| author | bors <bors@rust-lang.org> | 2025-09-21 13:21:30 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2025-09-21 13:21:30 +0000 |
| commit | 6710835ae739ca326441ff6c63d24fb123858300 (patch) | |
| tree | bdc8e9e29753eb1f7f555839350b53acb4e1d2c7 /src/librustdoc/formats/cache.rs | |
| parent | 1d23da6b7304d9e2a2c3dcb1b0aaa709cb9bc4ad (diff) | |
| parent | 4c208f5c64c3a86e52f5ebff2792ed1e3d8ca5b8 (diff) | |
| download | rust-6710835ae739ca326441ff6c63d24fb123858300.tar.gz rust-6710835ae739ca326441ff6c63d24fb123858300.zip | |
Auto merge of #146592 - Kobzol:tidy-diag, r=jieyouxu
Implement a simple diagnostic system for tidy In https://github.com/rust-lang/rust/pull/146316 and https://github.com/rust-lang/rust/pull/146580, contributors independently wanted to reduce the verbose output of tidy. But before, the output was quite ad-hoc, so it was not easy to control it. In this PR, I implemented a simple diagnostic system for tidy, which allows us to: 1) Only print certain information in verbose mode (`-v`) 2) Associate each (error) output to a specific check, so that it is easier to find out what exactly has failed and which check you might want to examine (not fully done, there are some random `println`s left, but most output should be scoped to a specific check) 3) Print output with colors, based on the message level (message, warning, error) 4) Show the start/end execution of each check in verbose mode, for better progress indication Failure output: <img width="1134" height="157" alt="image" src="https://github.com/user-attachments/assets/578a9302-e1c2-47e5-9370-a3556c49d9fc" /> Success output: <img width="388" height="113" alt="image" src="https://github.com/user-attachments/assets/cf27faf8-3d8b-49e3-88d0-fac27a9c36a8" /> Verbose output (shortened): <img width="380" height="158" alt="image" src="https://github.com/user-attachments/assets/ce7102b8-c2f3-42a8-a2ec-ca30389be91e" /> CC `@nnethercote` `@RalfJung` `@GuillaumeGomez` The first two commits and the last commit are interesting, the rest is just mechanical port of the code from `bad: &mut bool` to `DiagCtx` and `RunningCheck`. The `extra_checks` check could be further split, but I'd leave that for another PR. r? `@jieyouxu`
Diffstat (limited to 'src/librustdoc/formats/cache.rs')
0 files changed, 0 insertions, 0 deletions
