Skip to main content

Module isolation

Module isolation 

Source
Expand description

Rust unit-isolation lint for inline #[cfg(test)] modules. The AST walk is a deterministic syn heuristic; its precision limits live in internals/rust/isolation.md.

Re-exports§

pub use crate::violation::Violation;

Enums§

Language
The unit lint language selector.

Functions§

find_integration_violations
Every no-first-party-double violation in the tests/ crates under crate root root. An integration test runs first-party code for real, so doubling it is the error; doubling an external crate is fine.
find_violations
Every isolation violation in the unit source under scan_root, sorted by (file, line). crate_root’s Cargo.toml names the external crates, so a scan pointed at src/ still sees the dependency set. tests/, benches/, examples/, and target/ are not unit source, so a local build changes no result.