You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Auto merge of rust-lang#11779 - partiallytyped:11775, r=blyxyas
[`mod_module_files`] Don't emit lint for mod.rs in tests
fixes: rust-lang#11775
current state: indiscriminately emits the lint for mod files in tests.
The following
```
tests/
common/
mod.rs
test.rs
```
is a common pattern for code shared across the tests and is suggested in the rust book. The change adds an additional check to verify that the mod file is not in tests.
changelog: Fix [`mod_module_files`]: false positive for mod files in tests folder
/// Checks every path for the presence of `mod.rs` files and emits the lint if found.
156
+
/// We should not emit a lint for test modules in the presence of `mod.rs`.
157
+
/// Using `mod.rs` in integration tests is a [common pattern](https://doc.rust-lang.org/book/ch11-03-test-organization.html#submodules-in-integration-test)
0 commit comments