Validation API
Tier: Stable Core
Reports from Program.check(), rule metadata, and the project check settings.
pyrung.validation.ValidationReport
dataclass
Unified report from all core validators.
pyrung.validation.Finding
pyrung.validation.FindingDisplay
dataclass
Everything a UI needs to render a finding — no string parsing required.
problem is a shared lead line, used when there is no single offending token to
label (multi-site findings, or a contradiction). hint is the fix.
pyrung.validation.RuleSpec
dataclass
Fully self-describing metadata for one validation rule code.
Everything a UI needs to display a rule lives here — code, category,
severity, and a human title — so consumers (e.g. clicknick's Analyze
Program window) render from the registry and never hard-code their own copy.
validator is a key into report's validator dispatch, not a callable,
so several codes can share one pass (STUCK_HIGH/LOW; the PHYS + RANGE family).
pyrung.validation.ordered_rules
All rule specs in canonical display order: severity desc, then category, code.
The single source a UI iterates to lay out a report — most severe first.
pyrung.validation.default_on_rules
The curated core checks active when select is not given.
pyrung.validation.CheckConfig
dataclass
pyrung.validation.load_check_config
Read the [tool.pyrung.check] table of one pyproject.toml.
Return None if the file or the table is missing. Raise ValueError if the
table names a rule code or category that pyrung does not know. The message
names the file and the unknown name, so a config saved under an old rule name
fails on load and is never ignored.
pyrung.validation.save_check_config
Update just the check settings, preserving other TOML values and comments.