-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Add lint unflagged_test_modules
#10515
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? @Manishearth (rustbot has picked a reviewer for you, use r? to override) |
7a6747d
to
c89513b
Compare
☔ The latest upstream changes (presumably #10483) made this pull request unmergeable. Please resolve the merge conflicts. |
d44c430
to
e5d1015
Compare
I feel this lint needs to ignore items in testing directories |
This has the potential to be really noisy, cc @rust-lang/clippy . Thoughts? |
e5d1015
to
863fea3
Compare
mod tests {
fn helper() {}
#[test]
fn t() {
helper();
}
}
So it wouldn't be saving compile time/space as listed in the |
@Alexendoo Then I'm pretty confused on the utility of the whole |
If you had helper functions in the Yeah the book does seem to miss that |
Because otherwise you might need to include extra dependencies in normal mode, if your tests need them. |
a329f38
to
bf64e83
Compare
So... Should this lint exist at all? Are we still waiting for the Clippy team opinions about noisiness or it's just a bad idea of a lint? |
I think waiting on clippy team opinions. It'll get discussed at the meeting tomorrow. |
Actually, if it's Some salient points for the meeting:
|
Can someone run lintcheck against this and look if the lint warnings make sense for the crates? |
After using
0 instances of |
The general conclusion in the meeting was that this lint probably doesn't pull it's weight and is not worth merging. There was a major concern about a lack of clarity of how Another concern was this:
You may wish to engage on Zulip (perhaps by opening a new thread) to discuss it further. We're leaning towards closing this for now, but your work implementing and investigating this is highly appreciated! We'd like to apologize that it wasn't clear from the issue that this lint wasn't necessarily ready to be accepted. |
Ok! Closing this and focusing on 1 and 3 |
Adds 2. from #10506.
The lint name was change from
unflagged_tests_module
tounflagged_test_modules
to better fit lint naming conventions. This PR does not close completely #10506.changelog: [
unflagged_test_modules
]: Add the lint.