Detect integration tests in is_in_test - #16786
Conversation
|
r? @dswij rustbot has assigned @dswij. Use Why was this reviewer chosen?The reviewer was selected based on:
|
d96fa88 to
e3772c6
Compare
|
Hmmm it looks like it's causing problems because now some of clippy's tests are being treated as valid under |
10d22da to
07033e9
Compare
4588d65 to
d234340
Compare
This comment has been minimized.
This comment has been minimized.
|
Hello @ClementTsang, I hope that you don't mind we using this contribution to teach @medzernik some things about reviewing (they were very interested!). cc @medzernik Check out this comment first. |
|
@blyxyas nope, I don't mind! |
|
r? @medzernik |
|
I'm going to review this tomorrow, sorry for the radio silence ( =ノωヽ=) (I'm finally back up!) |
|
No worries, thanks to both of you for taking the time to review it! |
|
Reminder, once the PR becomes ready for a review, use |
d8b6122 to
9017078
Compare
This comment has been minimized.
This comment has been minimized.
9017078 to
6d5ec6c
Compare
|
This PR was rebased onto a different master commit. Here's a range-diff highlighting what actually changed. Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers. |
237c62b to
44e73f6
Compare
Makes it so that the is_in_test check accounts for if a node is in an integration test file (that is, under tests/). This should fix the issue where some clippy settings work for cfg(test) but not for integration tests.
44e73f6 to
1ea7460
Compare
|
@rustbot merge |
Related: #13981
This PR makes it so that the
is_in_testcheck accounts for if a node is in an integration test file (that is, undertests/). This should fix the issue where some clippy settings work forcfg(test)but not for integration tests.This could be extended to
benchesas well if this seems reasonable.Note that this is the first time I'm contributing to this repo, so please let me know if there's anything to change. I'm not really sure how I was meant to test this for example, especially if I want to test an example of this where it should still "fail", I guess (should I split the
integration_testwith two crates?).changelog: [
unwrap-used]:allow-unwrap-in-testsworks now on integration tests.