fix(tools): check doc links whose text is inline code #8638

Merged
Tripchipp merged 1 commit from upstream-pr/8638 into main 2026-10-21 04:54:14 +00:00
Tripchipp commented 2026-10-20 19:38:33 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by Tripchipp on 2026-10-20T19:38:33Z.


What

links() in tools/check_conventions.py removed inline code before it looked for links. When a link's text is entirely inline code, such as [`DrawPipeline::HeldReads`](path), the text was left empty and the link was skipped. doc-link therefore never checked these links. There are 55 of them in the repository. Inline code is now replaced with placeholder text instead of being removed, so the link is still found. Code spans that only look like links, such as [](auto), still yield no link.

With this change, a scan of every tracked .md file finds one dead link: [DrawPipeline::HeldReads] in the "Storage image write-back" entry of docs/dev/debt/libSceAgcDriver.md. It points to Execution/src/Driver/Draw/DrawPipeline.hpp, but the header is in Execution/include/Driver/Draw/. #7912 edits that line, so this PR leaves it alone to avoid a conflict. Once this is merged, #7912 needs that path corrected to pass the check. The check only looks at changed lines, so no other existing line fails.

Tested

macOS (Apple Silicon), Python 3.14.4:

  • The new links() test fails without the fix and passes with it.
  • 48 of the 49 tools/tests/test_*.py files pass when run as CMake runs them. test_shader_cache_runtime_sources.py was not run: it needs CMake, which is not installed here.
  • python3 tools/check_conventions.py --base origin/main passes.
  • tools/pr_overlap.py was too heavy to run on this machine. I checked overlap by hand instead: no open PR changes links(), INLINE or the doc-link tests.

Checklist

  • Based on current main; no other open PR implements the same functions
  • One topic per PR; follow-ups go in a new PR
  • No comments in code except technical debt
  • Unimplemented paths throw (NotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file
  • No notes, investigation .md files or images added to the repository (attach them to this PR)
  • New third-party code is a submodule built from source
  • Generic behaviour, not specific to one title
  • Depends on: none
  • Unblocks: none
  • GPUs tested: n/a
  • AI-assisted: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4941393227 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/8638). Originally posted by [Tripchipp](https://github.com/Tripchipp) on 2026-10-20T19:38:33Z. --- ### What `links()` in `tools/check_conventions.py` removed inline code before it looked for links. When a link's text is entirely inline code, such as ``[`DrawPipeline::HeldReads`](path)``, the text was left empty and the link was skipped. `doc-link` therefore never checked these links. There are 55 of them in the repository. Inline code is now replaced with placeholder text instead of being removed, so the link is still found. Code spans that only look like links, such as `[](auto)`, still yield no link. With this change, a scan of every tracked `.md` file finds one dead link: [`DrawPipeline::HeldReads`] in the "Storage image write-back" entry of `docs/dev/debt/libSceAgcDriver.md`. It points to `Execution/src/Driver/Draw/DrawPipeline.hpp`, but the header is in `Execution/include/Driver/Draw/`. #7912 edits that line, so this PR leaves it alone to avoid a conflict. Once this is merged, #7912 needs that path corrected to pass the check. The check only looks at changed lines, so no other existing line fails. ### Tested macOS (Apple Silicon), Python 3.14.4: - The new `links()` test fails without the fix and passes with it. - 48 of the 49 `tools/tests/test_*.py` files pass when run as CMake runs them. `test_shader_cache_runtime_sources.py` was not run: it needs CMake, which is not installed here. - `python3 tools/check_conventions.py --base origin/main` passes. - `tools/pr_overlap.py` was too heavy to run on this machine. I checked overlap by hand instead: no open PR changes `links()`, `INLINE` or the doc-link tests. ### Checklist - [x] Based on current `main`; no other open PR implements the same functions - [x] One topic per PR; follow-ups go in a new PR - [x] No comments in code except [technical debt](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/CONVENTIONS.md) - [x] Unimplemented paths throw (`NotImplemented_nid_no_patch`); silent stubs are listed under Silent stubs in their library's [technical debt](https://github.com/boykopovar/AnyPS5/tree/main/docs/dev/debt) file - [x] No notes, investigation `.md` files or images added to the repository (attach them to this PR) - [x] New third-party code is a submodule built from source - [x] Generic behaviour, not specific to one title - [x] Depends on: none - [x] Unblocks: none - [x] GPUs tested: n/a - [x] AI-assisted: yes
xXPBSXx commented 2026-10-20 22:35:13 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by xXPBSXx on 2026-10-20T22:35:13Z.


Windows data point for e58fcc9c3b: Windows 10.0.19045, Python 3.12.10, python -I -m unittest discover -s tools/tests -p test_check_conventions_doc_links.py, PR head checked out (not merged onto main).

  • With the PR: 6 tests, OK.
  • Same tree with tools/check_conventions.py restored to main (new test kept): 6 tests, 1 failure.
    Not tested: other platforms, a merge onto current main.
    AI-assisted (Claude Code).
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6303299595 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/8638#issuecomment-6303299595). Originally posted by [xXPBSXx](https://github.com/xXPBSXx) on 2026-10-20T22:35:13Z. --- Windows data point for `e58fcc9c3b`: Windows 10.0.19045, Python 3.12.10, `python -I -m unittest discover -s tools/tests -p test_check_conventions_doc_links.py`, PR head checked out (not merged onto `main`). - With the PR: 6 tests, OK. - Same tree with `tools/check_conventions.py` restored to `main` (new test kept): 6 tests, 1 failure. Not tested: other platforms, a merge onto current `main`. AI-assisted (Claude Code).
xXPBSXx commented 2026-10-21 03:11:33 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by xXPBSXx on 2026-10-21T03:11:33Z.


Linux data point for e58fcc9c3b (WSL2, Ubuntu 24.04, kernel 6.18 - a virtualised kernel, not bare-metal Linux; Python 3.12.3), this head merged onto main 5d10ea9ea (clean merge), python3 -I tools/tests/test_check_conventions_doc_links.py:

  • With the PR: 6 tests OK.
  • Without it (the PR's test_check_conventions_doc_links.py on top of main without the PR's source change): FAILED (1 failure).
    Not tested: macOS, Windows (Windows data from another run is not part of this comment).

AI-assisted (Claude Code).

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6307082000 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/8638#issuecomment-6307082000). Originally posted by [xXPBSXx](https://github.com/xXPBSXx) on 2026-10-21T03:11:33Z. --- Linux data point for `e58fcc9c3b` (WSL2, Ubuntu 24.04, kernel 6.18 - a virtualised kernel, not bare-metal Linux; Python 3.12.3), this head merged onto `main` `5d10ea9ea` (clean merge), `python3 -I tools/tests/test_check_conventions_doc_links.py`: - With the PR: 6 tests OK. - Without it (the PR's `test_check_conventions_doc_links.py` on top of `main` without the PR's source change): FAILED (1 failure). Not tested: macOS, Windows (Windows data from another run is not part of this comment). AI-assisted (Claude Code).
github-actions[bot] commented 2026-10-21 03:29:29 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-21T03:29:29Z.


Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.

Pull request Shared files not compared
PR 8777 tools/check_conventions.py
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6307306095 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/8638#issuecomment-6307306095). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-10-21T03:29:29Z. --- <!-- pr-overlap --> Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap. | Pull request | Shared files not compared | |---|---| | [PR 8777](https://www.github.com/boykopovar/AnyPS5/pull/8777) | `tools/check_conventions.py` |
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
boykopovar/AnyPS5!8638
No description provided.