-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Check .fixed
paths' existence in run_ui
#8844
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
Conversation
r? @flip1995 (rust-highfive has picked a reviewer for you, use r? to override) |
I believe there are a few lints with different lint emissions and applicability based on the context. 🙃 If we add something like this, I think we should add some option to disable it for specific test files. cc: @rust-lang/clippy, @Alexendoo, @dswij, @Jarcho |
I'm not sure if this is what you have in mind, but that sounds like what I did here: https://github.com/rust-lang/rust-clippy/pull/8844/files#diff-30869434167a8e693c01b4875d4855efeb3a28567f6531765b202e82cc398a99R59 |
It looks like nobody has any concerns regarding this change, and I also like it. r? @Alexendoo |
I like the idea, trying it locally it does take quite a while to run though, took up to a minute for me. Unfortunately the version of |
Sorry, but I don't understand what the two alternatives are (possibly because I don't know what "the One alternative is to bump the What is the other alternative? |
Clippy uses https://github.com/Manishearth/compiletest-rs, which is extracted from https://github.com/rust-lang/rust/tree/master/src/tools/compiletest. The one in The sync all thing would be to round up all of the upstream changes in one PR, but looking at other PRs to the repo I don't think that's how it's done. So a PR that bumps the |
Submitted. I'll update this PR once a new version of |
@Alexendoo I'm sorry if you were telling me this and I didn't get it: rust-lang/rustfix#199 is not in |
Oh whoops I thought it was, my mistake |
fixed_path_existence
test.fixed
paths' existence in run_ui
I've updated the PR to use |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great thanks!
You can also now merge these into their respective main test files, or delete them if the contents are duplicates
tests/ui/needless_late_init_fixable.rs
tests/ui/unnecessary_cast_fixable.rs
@Alexendoo I think I have addressed all of your comments. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me, thank you for this addition :) Also thank you, @Alexendoo, for the nice suggestion with the updated dependency. I wouldn't have known about that! @bors r=Alexendoo,xFrednet |
📌 Commit 534fc5d has been approved by |
Check `.fixed` paths' existence in `run_ui` This PR adds a test to check that there exists a `.fixed` file for every `.stderr` file in `tests/ui` that mentions a `MachineApplicable` lint. The test leverages `compiletest-rs`'s `rustfix_coverage` option. I tried to add `.fixed` files where they appeared to be missing. However, 38 exceptional `.rs` files remain. Several of those include comments indicating that they are exceptions, though not all do. Apologies, as I have not tried to associate the 38 files with GH issues. (I think that would be a lot of work, and I worry about linking the wrong issue.) changelog: none
💡 This pull request was already approved, no need to approve it again.
|
📌 Commit 534fc5d has been approved by |
Check `.fixed` paths' existence in `run_ui` This PR adds a test to check that there exists a `.fixed` file for every `.stderr` file in `tests/ui` that mentions a `MachineApplicable` lint. The test leverages `compiletest-rs`'s `rustfix_coverage` option. I tried to add `.fixed` files where they appeared to be missing. However, 38 exceptional `.rs` files remain. Several of those include comments indicating that they are exceptions, though not all do. Apologies, as I have not tried to associate the 38 files with GH issues. (I think that would be a lot of work, and I worry about linking the wrong issue.) changelog: none
@bors r- |
@bors r=Alexendoo,xFrednet |
📌 Commit 534fc5d has been approved by |
Check `.fixed` paths' existence in `run_ui` This PR adds a test to check that there exists a `.fixed` file for every `.stderr` file in `tests/ui` that mentions a `MachineApplicable` lint. The test leverages `compiletest-rs`'s `rustfix_coverage` option. I tried to add `.fixed` files where they appeared to be missing. However, 38 exceptional `.rs` files remain. Several of those include comments indicating that they are exceptions, though not all do. Apologies, as I have not tried to associate the 38 files with GH issues. (I think that would be a lot of work, and I worry about linking the wrong issue.) changelog: none
💔 Test failed - checks-action_test |
👀 Oh whoops that's my fault #8896 Maybe it would be worth ignoring the |
In a way, this is a success! :D What is your preference? I rebase and fix this, or ignore the the crashes dir (and maybe revert the changes thereto)? |
I rebased and added a commit for ice-8850. Please let me know if you would rather ignore the crashes dir. |
I think it would be good to ignore the crashes directory. The focus of those UI tests is not to test the lint, but the lint implementation itself. Either option would be correct, though. If it's simple to do, I would appreciate that change. 🙃 |
Oops, I forgot about Windows again. |
This version looks good to me, thank you for the work! I'll leave the final r+ to @Alexendoo 🙃 @bors delegate=Alexendoo |
✌️ @Alexendoo can now approve this pull request |
📌 Commit 6027255 has been approved by |
☀️ Test successful - checks-action_dev_test, checks-action_remark_test, checks-action_test |
This PR adds a test to check that there exists a
.fixed
file for every.stderr
file intests/ui
that mentions aMachineApplicable
lint. The test leveragescompiletest-rs
'srustfix_coverage
option.I tried to add
.fixed
files where they appeared to be missing. However, 38 exceptional.rs
files remain. Several of those include comments indicating that they are exceptions, though not all do. Apologies, as I have not tried to associate the 38 files with GH issues. (I think that would be a lot of work, and I worry about linking the wrong issue.)changelog: none