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. - Python
Config - The
[python]table. Both keys are optional, so a repo can configure just coverage, just exemptions, or both. - Python
Coverage [python].coverage.- Rust
Config - The
[rust]table. - Rust
Coverage [rust].coverage. Branch coverage is still experimental, so only regions/lines are configurable.- Type
Script Config - The
[typescript]table. - Type
Script Coverage [typescript].coverage.
Enums§
- Rule
- A rule a file can be exempted from (issue #32).
Functions§
- load_
config - Read one config file at
pathinto aConfig, validating it on the way. - resolve_
exempt - Resolve the set of exempt paths for
rulefromexemptions, validating that each still points to a file underroot.