Skip to main content

Module config

Module config 

Source
Expand description

The testing-conventions config schema and loader. A malformed or unknown-key config is an error, never a silently-accepted default.

Structs§

Config
A fully-parsed testing-conventions config file.
E2eConfig
The [e2e] table. detect renders these into e2e verify --extra-scope / --exclude; the binary only accepts the table so a consumer declaring it still loads.
Exemption
One auditable per-file exemption — a [[<language>.exempt]] entry.
OneFunctionPerFile
[<language>].one_function_per_file. A partial override: a missing field falls back to OneFunctionPerFile::default.
PythonConfig
The [python] table.
PythonCoverage
[python].coverage. A partial override: a missing field falls back to PythonCoverage::default.
RustConfig
The [rust] table.
RustCoverage
[rust].coverage. A partial override: a missing field falls back to RustCoverage::default. branch instruments only on a nightly toolchain.
TypeScriptConfig
The [typescript] table.
TypeScriptCoverage
[typescript].coverage. A partial override: a missing field falls back to TypeScriptCoverage::default.

Enums§

LineScope
What an exemption lifts for one file: the whole file, or only specific lines.
LineSpec
One element of an exemption’s lines list: a single 1-based line, or an inclusive "start-end" range. Semantic checks live in Config::validate, so the error can name the offending exemption.
Rule
A rule a file can be exempted from.

Functions§

load_config
Read one config file at path into a Config, validating it on the way.
resolve_exempt
The exempt paths for rule as /-joined, root-relative strings. A stale entry — a path that no longer exists — is an error, so the exempt list can’t silently rot.
resolve_exempt_scoped
The per-file exempt LineScope for rule. Like resolve_exempt, a stale path is a hard error; two entries naming the same file merge via LineScope::merged_with.