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.detectrenders these intoe2e 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. - OneFunction
PerFile [<language>].one_function_per_file. A partial override: a missing field falls back toOneFunctionPerFile::default.- Python
Config - The
[python]table. - Python
Coverage [python].coverage. A partial override: a missing field falls back toPythonCoverage::default.- Rust
Config - The
[rust]table. - Rust
Coverage [rust].coverage. A partial override: a missing field falls back toRustCoverage::default.branchinstruments only on a nightly toolchain.- Type
Script Config - The
[typescript]table. - Type
Script Coverage [typescript].coverage. A partial override: a missing field falls back toTypeScriptCoverage::default.
Enums§
- Line
Scope - What an exemption lifts for one file: the whole file, or only specific lines.
- Line
Spec - One element of an exemption’s
lineslist: a single 1-based line, or an inclusive"start-end"range. Semantic checks live inConfig::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
pathinto aConfig, validating it on the way. - resolve_
exempt - The exempt paths for
ruleas/-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
LineScopeforrule. Likeresolve_exempt, a stale path is a hard error; two entries naming the same file merge viaLineScope::merged_with.