checks.run_checks(spec, today=None)
Run every check: architecture, all units, all decisions.
Parameters
| spec |
RegenSpec |
The loaded spec. |
required |
| today |
date | None |
Reference date for review deadlines. Defaults to today. |
None |
Returns
|
list[Finding] |
list[Finding]: Errors first, then warnings, each group in check order. |
Examples
from pathlib import Path
from tempfile import TemporaryDirectory
from spotregen import load_spec, make_sample_repo, run_checks
with TemporaryDirectory() as tmp:
root = make_sample_repo(Path(tmp) / "demo")
spec = load_spec(root)
print(len(run_checks(spec)), "findings")
(root / "regen/units/core.calc.toml").unlink()
print(len(run_checks(load_spec(root))), "findings without the unit")
0 findings
1 findings without the unit