Skip to main content

Crate testing_conventions

Crate testing_conventions 

Source

Modules§

agents
install: upsert the testing contract into the repository’s agent context file as a marker-delimited, hash-versioned block.
co_change
The commit-scoped co-change check: a source file that changed in a git diff must change its colocated test too.
colocated_test
The unit colocated-test check.
config
The testing-conventions config schema and loader. A malformed or unknown-key config is an error, never a silently-accepted default.
coverage
Coverage rule: the unit suite must clear the configured floor, with test files and the config’s exempt paths out of the denominator. Each language pairs a pure evaluate* over a parsed report with a measure* that shells out to its tool.
e2e
e2e attest / e2e verify — the e2e decision nudge. attest records the runner’s chosen command as a branch-keyed receipt; verify confirms a branch changing scoped source has one.
isolation
Rust unit-isolation lint: an inline #[cfg(test)] mod may call and import only into the unit under test, its parent module reached via super::. The AST walk is the deterministic syn heuristic; its design and precision limits live in internals/rust/isolation.md.
lint
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/.
mutation
Mutation testing (unit mutation) — the rung above coverage: a test that runs a line still passes if you delete its assertions, and a surviving mutant proves it. Each language drives its engine through an adapter; this module measures, the CLI layer gates.
one_function
The unit one-function-per-file check: a source file holds at most one module-scope function whose body runs longer than the configured threshold.
packaging
Packaging rule — the deterministic core: given the root of an unpacked built artifact and the test-file globs that must not appear in it, scan returns every offending file.
patch_coverage
Diff-scoped coverage floor.
tiers
The standard suite-tier layout, derived from the package root.
ts
TypeScript isolation analysis, parsed with oxc — the counterpart to the Python crate::lint module. Each *.test.{ts,tsx,mts,cts} file is parsed and walked, and its specifiers are classify-ed first-party / Node-builtin / third-party.
violation
The shared Violation type emitted by the deterministic test-code lints.
workflow
Workflow guard — flag a workflow invocation naming a subcommand the CLI no longer exposes. Extraction is a line-based, shell-aware scan, not a GitHub Actions parser.

Structs§

Cli

Enums§

IntegrationLintLanguage
Languages the integration-test lints support.

Functions§

command
The binary’s own clap command tree, which the workflow guard checks invocations against.
run