Catch Broken Markdown Links and #Anchors Offline Before They Hit Production with DeadLinkFinder
Описание и применение
DeadLinkFinder проверяет Markdown‑ссылки и GitHub‑анкорные заголовки локально, предлагая похожие варианты и генерируя SARIF‑отчёты для CI.
Задача
Documentation changes often leave dead relative links and broken GitHub‑style heading anchors that are hard to detect in code reviews.
Результат
DeadLinkFinder identifies missing local files, images, and anchors in milliseconds, suggests close matches, and can output SARIF for GitHub PR annotations, enabling reliable documentation integrity checks in CI pipelines.
Рабочий процесс
- Run deadlinkfinder against the docs directory or specific Markdown files.
- Review terminal output for errors and suggestions.
- Fix reported issues in the documentation files.
- Re‑run deadlinkfinder to confirm resolution.
- Integrate deadlinkfinder into CI by adding a step that exits on errors or generates a SARIF report for GitHub Code Scanning.
Доказательства
DeadLinkFinder uses only the Python standard library (re, pathlib, difflib, urllib), meaning zero external dependencies to audit or maintain.
Example terminal output: $ deadlinkfinder docs/ 🔍 DeadLinkFinder - Verifying documentation integrity... [!] DLF-001 ERROR docs/getting-started.md:28 Target not found: '../guides/setup.md' Suggestion: Did you mean '../guides/install-setup.md'?
Generate a SARIF report with deterministic line fingerprints: deadlinkfinder . --format sarif --output results.sarif
- Дата записи: 2026-10-16T11:41:22.019Z