The lint job fails on broken Markdown links and anchors #304

Merged
claude merged 2 commits from feature/46-markdown-link-check into develop 2026-11-05 11:09:22 -05:00
Owner

The lint job now fails on a broken relative Markdown link or #anchor.

  • .forgejo/scripts/check-markdown-links.py (Python stdlib, python3 -I) checks every tracked .md: inline links (including <path with spaces> and nested parentheses), reference definitions, <a href>/<img src>, and anchors against GitHub/Forgejo heading slugs (duplicates get -1, -2) and <a id>/<a name>. Fenced code, inline code and HTML comments are ignored. External URLs are skipped unless --external or NINLIL_LINK_CHECK_EXTERNAL=true.
  • New "markdown links" step in .forgejo/scripts/lint.sh; self-test .forgejo/scripts/tests/check-markdown-links.test.sh (red before the checker existed, and red against the first version for the comment and path cases).
  • On HEAD: 54 files, 456 relative links, 384 anchors, 0 problems. Mutation checks (renamed headings in README.md and CONTRIBUTING.md, a broken file link in src/angular/README.md) were each reported at the right file and line. Full lint passes in the CI container.
  • Known limit, stated in the header: indented code blocks are checked like text, because nested list content uses the same indentation.

Closes #46

🤖 Generated with Claude Code

https://claude.ai/code/session_01T33E3pmQvqkTriyQUMNUTK

The lint job now fails on a broken relative Markdown link or `#anchor`. - `.forgejo/scripts/check-markdown-links.py` (Python stdlib, `python3 -I`) checks every tracked `.md`: inline links (including `<path with spaces>` and nested parentheses), reference definitions, `<a href>`/`<img src>`, and anchors against GitHub/Forgejo heading slugs (duplicates get `-1`, `-2`) and `<a id>`/`<a name>`. Fenced code, inline code and HTML comments are ignored. External URLs are skipped unless `--external` or `NINLIL_LINK_CHECK_EXTERNAL=true`. - New "markdown links" step in `.forgejo/scripts/lint.sh`; self-test `.forgejo/scripts/tests/check-markdown-links.test.sh` (red before the checker existed, and red against the first version for the comment and path cases). - On HEAD: 54 files, 456 relative links, 384 anchors, 0 problems. Mutation checks (renamed headings in README.md and CONTRIBUTING.md, a broken file link in src/angular/README.md) were each reported at the right file and line. Full lint passes in the CI container. - Known limit, stated in the header: indented code blocks are checked like text, because nested list content uses the same indentation. Closes #46 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01T33E3pmQvqkTriyQUMNUTK
Closes #46

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01T33E3pmQvqkTriyQUMNUTK
The Markdown link check ignores links in HTML comments and reads paths with spaces or parentheses
Some checks failed
Build / Pack and Push NuGet Packages (common) (pull_request) Has been skipped
Build / Pack and Push NuGet Packages (dns-core) (pull_request) Has been skipped
Build / Build Binary (linux-arm64) (pull_request) Has been skipped
Build / Pack and Push NuGet Packages (dns-server) (pull_request) Has been skipped
Build / Build Binary (macos-amd64) (pull_request) Has been skipped
Build / Build Binary (macos-arm64) (pull_request) Has been skipped
Build / Build Binary (windows-amd64) (pull_request) Has been skipped
Build / Build and Test Deb and RPM Packages (pull_request) Has been skipped
Build / Build Arch Linux Packages (pull_request) Has been skipped
Build / Smoke Test the Windows Binary (pull_request) Has been skipped
Build / Build and Push Image (pull_request) Has been skipped
Build / Publish Release (pull_request) Has been skipped
Build / Pipeline (pull_request) Failing after 0s
Build / Test .NET (push) Failing after 15m41s
Build / Pack and Push NuGet Packages (common) (push) Has been skipped
Build / Pack and Push NuGet Packages (dns-core) (push) Has been skipped
Build / Pack and Push NuGet Packages (dns-server) (push) Has been skipped
Build / Pack and Push NuGet Packages (dhcp) (push) Has been skipped
Build / Stage Draft Release (push) Has been skipped
Build / Build Binary (linux-amd64) (push) Has been skipped
Build / Build Binary (macos-amd64) (push) Has been skipped
Build / Build Arch Linux Packages (push) Has been skipped
Build / Build and Test Deb and RPM Packages (push) Has been skipped
Build / Build Binary (macos-arm64) (push) Has been skipped
Build / Build Binary (linux-arm64) (push) Has been skipped
Build / Build Binary (windows-amd64) (push) Has been skipped
Build / Build and Push Image (push) Has been skipped
Build / Smoke Test the Windows Binary (push) Has been skipped
Build / Pipeline (push) Failing after 0s
Build / Publish Release (push) Has been skipped
5cd615c8da
Refs #46

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01T33E3pmQvqkTriyQUMNUTK
claude merged commit 365cca138b into develop 2026-11-05 11:09:22 -05:00
Sign in to join this conversation.
No reviewers
No milestone
No project
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.

Dependencies

No dependencies set

Reference
lantea-one/ninlil!304
No description provided.