Skip to main content

Module config

Module config 

Source
Expand description

The testing-conventions config schema and loader.

One config file is read into the in-memory Config below. The loader parses and validates the config itself (the “self-guard” from issue #12): a malformed or unknown-key config is an error, never a silently-accepted default. Validation also covers the per-file Exemption list (issue #32): every exemption must name at least one rule and carry a non-empty reason.

Structs§

Config
A fully-parsed testing-conventions config file.
Exemption
One auditable per-file exemption — a [[<language>.exempt]] entry.
PythonConfig
The [python] table. Both keys are optional, so a repo can configure just coverage, just exemptions, or both. Default (no coverage table, no exemptions) backs the zero-config path: an absent [python] table means the rule runs against the default floor with nothing exempt (#80).
PythonCoverage
[python].coverage.
RustConfig
The [rust] table.
RustCoverage
[rust].coverage. Branch coverage is still experimental, so only regions/lines are configurable.
TypeScriptConfig
The [typescript] table.
TypeScriptCoverage
[typescript].coverage.

Enums§

Rule
A rule a file can be exempted from (issue #32).

Functions§

load_config
Read one config file at path into a Config, validating it on the way.
resolve_exempt
Resolve the set of exempt paths for rule from exemptions, validating that each still points to a file under root.