Skip to content

Fail CI on unresolved relative markdown links - #40

Merged
mraible merged 1 commit into
mainfrom
ci/resolve-relative-md-links
Aug 20, 2026
Merged

Fail CI on unresolved relative markdown links#40
mraible merged 1 commit into
mainfrom
ci/resolve-relative-md-links

Conversation

@mraible

@mraible mraible commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

markdownlint checks link syntax, not whether a target resolves. Today a broken relative link — a moved file, or a ../ path that no longer resolves after content moves into a references/ subdirectory — is only caught by release.sh --bundle's link check, which runs at release time after the tag is published. That is a quality gate masquerading as a release gate.

This adds a step to the markdownlint job that walks every relative link in a tracked .md file and fails on any that does not resolve, reporting all offenders rather than stopping at the first. Root-relative (/foo) links resolve from the repo root, as GitHub renders them; external, mailto:, and anchor-only links are skipped.

Verified locally: passes on the current tree (55 files, all links resolve), and catches an injected ../does-not-exist.md — including the depth-aware references/ case the release-time check was the only thing catching.

markdownlint checks link syntax, not whether the target exists, so a moved file
or a bad ../ path only surfaced at release time when release.sh --bundle walks
the archive. Add a step to the markdownlint job that resolves every relative
link in a tracked .md and fails on any that does not exist, reporting all
offenders. Root-relative links resolve from the repo root as GitHub renders
them; external, mailto, and anchor-only links are skipped.
@mraible
mraible requested a review from a team August 19, 2026 18:49
@mraible
mraible enabled auto-merge (squash) August 19, 2026 18:50
@mraible
mraible merged commit 67d213e into main Aug 20, 2026
6 checks passed
@mraible
mraible deleted the ci/resolve-relative-md-links branch August 24, 2026 20:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants