Problem
The report links in the README point to documentation pages/anchors that don't exist (e.g. quark_rules.html, which is not a real page). There is currently no automated check, so broken links only get noticed when someone finds them manually. The README has 21 of these doc links.
Plan
After the docs are built in CI, compare the README links against the build output; fail the check (blocking merge) on any mismatch.
-
Add a script docs/check_readme_links.py that does three things:
- Extract every link in
README.md that points to our own docs (e.g. .../malware_report.html#brata, where the part after # is a section anchor).
- Check that the target page exists in the built docs.
- Open that page and confirm the anchor (section) actually exists in it.
If any of the three fails, the script reports failure.
-
Run this check automatically on every PR / push to master: checkout -> build the docs to HTML (sphinx-build docs/source docs/_build/html) -> run the script. If a broken link is found, the check fails and the PR cannot be merged. It is a standalone job and does not affect the existing tests. (A new workflow file .github/workflows/docs-link-check.yml.)
Problem
The report links in the README point to documentation pages/anchors that don't exist (e.g.
quark_rules.html, which is not a real page). There is currently no automated check, so broken links only get noticed when someone finds them manually. The README has 21 of these doc links.Plan
After the docs are built in CI, compare the README links against the build output; fail the check (blocking merge) on any mismatch.
Add a script
docs/check_readme_links.pythat does three things:README.mdthat points to our own docs (e.g..../malware_report.html#brata, where the part after#is a section anchor).If any of the three fails, the script reports failure.
Run this check automatically on every PR / push to
master: checkout -> build the docs to HTML (sphinx-build docs/source docs/_build/html) -> run the script. If a broken link is found, the check fails and the PR cannot be merged. It is a standalone job and does not affect the existing tests. (A new workflow file.github/workflows/docs-link-check.yml.)