-
Notifications
You must be signed in to change notification settings - Fork 12.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add a way to track Rustfix UI test coverage #59398
Conversation
(rust_highfive has picked a reviewer for you, use r? to override) |
r? @oli-obk and cc @killercup I guess? =) |
e2b4d1e
to
1e18c0e
Compare
This comment has been minimized.
This comment has been minimized.
This came out of the first Rustfix WG meeting. One of the goals is to enable Rustfix tests for all UI tests that trigger lints with `MachineApplicable` suggestions. In order to do that we first want to create a tracking issue that lists all files with missing `// run-rustfix` headers. This PR adds a `--rustfix-coverage` flag to `./x.py` and compiletest to list the files with the missing headers in `/tmp/rustfix_missing_coverage.txt`. From that file we can create the tracking issue and at some point also enforce the `// run-rustfix` flag on UI tests with `MachineApplicable` lints.
1e18c0e
to
02b8533
Compare
The job Click to expand the log.
I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
Not all suggestions come from lints
This will need a bump of the rustfix version as well, once rust-lang/rustfix#165 is merged and released. |
I don't think we should be writing to |
Good point, fixed in d808bd4. It's now written to |
@bors r+ now you've got me thinking about how I can get our CI to emit this metric on every build so I can create a graph |
📌 Commit d808bd4 has been approved by |
I think this won't succeed yet because it will still crash on some UI tests until rust-lang/rustfix#165 is merged =) |
Since we're not running the script in CI, is that problematic? I mean until it's merged and rustfix is updated in this repo, we can just remove the broken tests locally. |
Oh, you're completely right! It will be fine then =) |
Pretty much a copy of rust-lang/rust#59398 minus the rustc bootstrap things. This will allow rustfix coverage tracking in Clippy and other libraries that emit `MachineApplicable` diagnostics.
Add a way to track Rustfix UI test coverage This came out of the first Rustfix WG meeting. One of the goals is to enable Rustfix tests for all UI tests that trigger lints with `MachineApplicable` suggestions. In order to do that we first want to create a tracking issue that lists all files with missing `// run-rustfix` headers. This PR adds a `--rustfix-coverage` flag to `./x.py` and compiletest to list the files with the missing headers in `/tmp/rustfix_missing_coverage.txt`. From that file we can create the tracking issue and at some point also enforce the `// run-rustfix` flag on UI tests with `MachineApplicable` lints.
Rollup of 10 pull requests Successful merges: - #58717 (Add FromStr impl for NonZero types) - #59091 (Combine input and eval_always query types) - #59216 (Type dependent defs wrappers) - #59318 (rustc: Update linker flavor inference from filename) - #59320 (rustc: Allow using `clang` for wasm32 targets) - #59363 (#59361 Moved rustc edition opt to short list) - #59371 (ffi: rename VaList::copy to VaList::with_copy) - #59398 (Add a way to track Rustfix UI test coverage) - #59408 (compiletest: make path normalization smarter) - #59429 (When moving out of a for loop head, suggest borrowing it in nll mode) Failed merges: r? @ghost
This came out of the first Rustfix WG meeting.
One of the goals is to enable Rustfix tests for all UI tests that
trigger lints with
MachineApplicable
suggestions. In order to do thatwe first want to create a tracking issue that lists all files with
missing
// run-rustfix
headers.This PR adds a
--rustfix-coverage
flag to./x.py
and compiletest tolist the files with the missing headers in
/tmp/rustfix_missing_coverage.txt
.From that file we can create the tracking issue and at some point also
enforce the
// run-rustfix
flag on UI tests withMachineApplicable
lints.