The examples/README.md documents run commands for all 28 examples (e.g. vera run examples/factorial.vera --fn factorial -- 10). These commands are not validated by CI — if an example is renamed, a function is removed, or the README table goes stale, CI won't catch it.
Proposal
Add a validation script (or extend check_examples.py) that:
- Parses the markdown tables in
examples/README.md
- Extracts
vera run commands from the Run column
- Verifies referenced
.vera files exist
- If
--fn is specified, verifies the function is exported in that file
Wire into CI alongside check_examples.py.
Context
Suggested by CodeRabbit on PR #358. The existing check_examples.py validates all examples pass vera check and vera verify, but does not validate the run instructions in the README.
Related: #358 (http.vera fix)
The
examples/README.mddocuments run commands for all 28 examples (e.g.vera run examples/factorial.vera --fn factorial -- 10). These commands are not validated by CI — if an example is renamed, a function is removed, or the README table goes stale, CI won't catch it.Proposal
Add a validation script (or extend
check_examples.py) that:examples/README.mdvera runcommands from the Run column.verafiles exist--fnis specified, verifies the function is exported in that fileWire into CI alongside
check_examples.py.Context
Suggested by CodeRabbit on PR #358. The existing
check_examples.pyvalidates all examples passvera checkandvera verify, but does not validate the run instructions in the README.Related: #358 (http.vera fix)