add check to ensure ToC in README.md matches headings in the file (#541)

This introduces a Python script (written by Codex!) to verify that the
table of contents in the root `README.md` matches the headings. Like
`scripts/asciicheck.py` in https://github.com/openai/codex/pull/513, it
reports differences by default (and exits non-zero if there are any) and
also has a `--fix` option to synchronize the ToC with the headings.

This will be enforced by CI and the changes to `README.md` in this PR
were generated by the script, so you can see that our ToC was missing
some entries prior to this PR.
This commit is contained in:
Michael Bolin
2025-04-22 09:38:12 -07:00
committed by GitHub
parent dd330646d2
commit 9b06fb48a7
3 changed files with 128 additions and 1 deletions

View File

@@ -70,3 +70,5 @@ jobs:
- name: Ensure README.md contains only ASCII and certain Unicode code points
run: ./scripts/asciicheck.py README.md
- name: Check README ToC
run: python3 scripts/readme_toc.py README.md