Skip to content

doc-check: follow-ups from #942 reviews (symlinks through folders, budgets, fences) #947

Open

Description

@scuttletoby

Follow-ups from the round-2 lens reviews of #942 (both SAFE TO MERGE). None is a regression from main; one small PR can do them all.

  1. Removal scan misses folder symlinks (fork-ci/actions/doc-check/doc_check.py:349-390, removed_target). It matches removed paths by spelling and only runs when a file is deleted. Still passing in --base: an untouched CLAUDE.md -> d/A.md with d -> docs when docs/A.md is deleted or docs renamed; a folder symlink retargeted out of the repo or to nothing; the same through a doc link. Fix: also compare each symlink's real path (os.path.realpath) against the removed files, and run the scan when a symlink changes too. Keep "already dangling on base" and loops unblamed.
  2. Untouched symlink budget in --base (doc_check.py:431). CLAUDE.md -> AGENTS.md is never re-checked when AGENTS.md grows: --base passes at 61 lines, --all fails on CLAUDE.md's 40-line budget. Recommendation: --base also checks an untouched symlink whose target changed, under the symlink's own budget, so both modes agree.
  3. Inline code can start mid-run of backticks (doc_check.py:59): an unmatched run like "close it with ``` and see g" hides a real link main reports. Fix: add (?<!)` before the opening group. Test.
  4. Fence on a list item's own line (doc_check.py:216): - ```sh is missed, so its closing line opens a fence that hides the rest of the item. Test.
  5. Indented code in list items (doc_check.py:193): a link inside a list item's indented code block is reported (main skipped it). Extra failure only; decide and test.

Reports: #942 (comment) (merge-path), #942 (comment) (state).

🤖 Generated with Claude Code

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions