Open jdygert-spok opened 2 months ago
Benchmarks and integration tests are also not considered tests. Not sure if that's worth a separate issue. Previously this wouldn't really matter, because you would enable lints at the crate root, so they wouldn't apply to those. But setting lints in Cargo.toml
means they apply to all targets.
@rustbot label I-false-negative
Description
It seems like an intentional change from #13049. However, it is common in our codebase to have a testing feature that enables test utilities for integration tests or tests in other crates in the workspace. These are no longer excluded from
wildcard_imports
and some other lints. It would be great to have configuration for this, either checking for the "test" name again or setting a list of features that are included in the cfg check.Regardless of whether that becomes available, the docs for
wildcard_import
should be updated: https://github.com/rust-lang/rust-clippy/blob/0ee9f44568b60aaef5d04684cb08f112edd89542/clippy_lints/src/wildcard_imports.rs#L70Version
No response
Additional Labels
No response