Skip to main content

Crate testing_conventions

Crate testing_conventions 

Source

Modules§

co_change
The commit-scoped co-change check (#33): a source file that changed in a git diff must change its colocated test too.
colocated_test
The unit colocated-test check (Python — issue #15; TypeScript — issue #18; exemptions — issue #32).
config
The testing-conventions config schema and loader.
coverage
Coverage rule (Python — issue #26; TypeScript — issue #31; Rust — issue #37; exemptions — issue #32).
e2e
e2e attest / e2e verify (#17) — the e2e attestation nudge.
isolation
Rust unit-isolation lint (#44): an inline #[cfg(test)] mod may call only into the unit under test — its parent module, reached via super::. A call out of the test’s own module — into another first-party module (crate::…), an external crate, or effectful std — is a violation. Inject a trait double (hand-rolled or mockall) instead; the compiler checks the double.
lint
Integration-test lints (issue #19; rules #48–#52) — the integration lint command.
packaging
Packaging rule — foundation (issue #70).
patch_coverage
Diff-scoped coverage floor (Python — #132; TypeScript — #135; Rust — #136; folded into unit coverage --base — #162; parent #46).
ts
TypeScript isolation analysis (issue #43), parsed with oxc.
violation
The shared Violation type emitted by the deterministic test-code lints.
workflow
Workflow guard — keep the reusable workflow in step with the CLI (issue #92).

Structs§

Cli

Enums§

IntegrationLintLanguage
Languages the integration-test lints support — its own set (Python, TypeScript, Rust), distinct from the file-pairing colocated_test::Language, so adding Rust here doesn’t touch the colocated-test/coverage rules.

Functions§

command
The binary’s own clap command tree — the source of truth for which subcommands it exposes. The workflow guard (#92) checks a workflow’s invocations against it, so a renamed or removed subcommand is caught the moment they diverge.
run