ci: catch broken markdown links#403
Conversation
There was a problem hiding this comment.
Pull request overview
This PR adds an offline broken-Markdown-link check to the existing pre-commit-driven lint workflow (both locally and in CI) by introducing the lychee pre-commit hook, and updates the lint step wording to reflect the broader checks.
Changes:
- Add
lycheeas a pre-commit hook (offline) to detect broken links in Markdown files. - Update the CI lint step name/message to mention Markdown link checks.
- Add an acknowledgment entry for the contributor who introduced the link checks.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
ACKNOWLEDGMENTS.md |
Adds contributor acknowledgment for the new Markdown link checks. |
.pre-commit-config.yaml |
Introduces the lychee hook configured for offline Markdown link checking. |
.github/workflows/pull_request.yml |
Renames the lint step and updates the failure message to include Markdown link checks. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
This looks interesting, but: This is a third party and we don't build docs for this -- we shouldn't be checking this. These links do resolve -- they are cross doc package links, see: https://swiftpackageindex.com/ml-explore/mlx-swift/main/documentation/mlx |
|
Ah, I suppose this would require a gating mechanism or a mutli-repo checkout (overengineering?). I found .lycheeignore. I'll add the third-parties that resolve on swiftpackageindex.com/ml-explore. |
fe623f6 to
a6fce24
Compare
Proposed changes
This PR adds the same broken Markdown link check as ml-explore/mlx-swift-examples#479.
It adds lychee to pre-commit in offline mode so the existing lint workflow catches broken Markdown links in CI, and updates the lint step wording to reflect that it now runs both style and Markdown link checks.
The first full local run shows the new check finding existing broken links; that failure is intentionally left visible for CI.
Checklist
pre-commit run --all-filesto format my code / installed pre-commit prior to committing changes