Skip to main content

Module lint

Module lint 

Source
Expand description

The Python mocking mechanism and style lints behind integration lint, plus the Python arm of unit lint. Each test file is parsed with rustpython_parser and walked with a Visitor; the rules themselves are documented under docs/reference/checks/.

Re-exports§

pub use crate::violation::Violation;

Functions§

find_suite_violations
Every lint violation in package_root’s suite tiers, sorted by (file, line). tests/integration/ and tests/e2e/ both run first-party code for real; a *_test.py under tests/ outside them is unknown-tier rather than silently unscanned.
find_unit_isolation_violations
Every unmocked-collaborator violation under root — a collaborator a *_test.py imports without mocking it — sorted by (file, line). First-party is the dist’s own package ([first_party_package]); a tree that declares none reports nothing.
find_violations
Every lint violation in the Python test files under root, sorted by (file, line). A Python test file is *_test.py or conftest.py, where fixtures live; a legacy test_*.py is ordinary source. A file that cannot be read or parsed is an error.