Skip to main content

A markdown link validation reporting tool.

Project description

PyPi Documentation Status Downloads

GitHub issues Contributing

markdown-checker is a markdown link validation reporting tool for .md and .ipynb files. It flags broken relative paths, broken web URLs, missing locale segments, and missing tracking IDs, then writes the findings as a report your CI can post back to a pull request.

Features

  • Five built-in checks: broken relative paths, broken web URLs, locale segments in URLs, and tracking IDs on URLs and paths.
  • Concurrent URL checking with cross-file deduplication, per-host rate pacing, and Retry-After/429 handling, so large repositories don't trip host rate limits.
  • Four report formats: markdown, json, github-annotations, and console.
  • Error vs. warning severity - rate-limited or unverifiable links are reported but never fail your CI.
  • Configuration via a [tool.markdown-checker] table in pyproject.toml, so you don't have to repeat flags in every command or workflow file.

Installation

pip install markdown-checker

Quickstart

markdown-checker . -f check_broken_paths
🔍 Checked 42 links in 10 files.
All files are compliant with the guidelines. 🎉

When issues are found, a comment.md report is written and the command exits with a non-zero status:

🔍 Checked 42 links in 10 files.
😭 Found 1 issues in the following files:
    File 'docs/index.md', line 5
./missing.md is broken.

Using markdown-checker in GitHub Actions

Run this tool within a GitHub workflow using the action-check-markdown GitHub Action, which posts the report as a pull request comment:

- uses: john0isaac/action-check-markdown@v1.2.0
  with:
    github-token: ${{ secrets.GITHUB_TOKEN }}
    command: check_broken_paths
    directory: ./
    guide-url: "https://github.com/<owner>/<repo>/blob/main/CONTRIBUTING.md"

See the GitHub Actions how-to for the full workflow, including running check_broken_urls (not yet supported by the wrapper action) directly as a step.

Documentation

Contributing

Contributions are welcome - see the Contributing guide.

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

markdown_checker-1.2.1.tar.gz (161.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

markdown_checker-1.2.1-py3-none-any.whl (45.2 kB view details)

Uploaded Python 3

File details

Details for the file markdown_checker-1.2.1.tar.gz.

File metadata

  • Download URL: markdown_checker-1.2.1.tar.gz
  • Upload date:
  • Size: 161.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.26 {"installer":{"name":"uv","version":"0.11.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for markdown_checker-1.2.1.tar.gz
Algorithm Hash digest
SHA256 9d76888d6d5e9bd3ae918e53abf8e11f25d6d1bfb8a3a0307070661662fab034
MD5 c924c161f77835709fff3815d8d23b59
BLAKE2b-256 6c12761e7d70f1297d6801e8e1a776340734f9ea93a62ef876e451255f04fdea

See more details on using hashes here.

File details

Details for the file markdown_checker-1.2.1-py3-none-any.whl.

File metadata

  • Download URL: markdown_checker-1.2.1-py3-none-any.whl
  • Upload date:
  • Size: 45.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.26 {"installer":{"name":"uv","version":"0.11.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for markdown_checker-1.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 b1615fb7f4aef11e1208c6bb1dd12841f8708cf56c387dd33ebba844344aeac7
MD5 b67475bac193f904dbbdea2b820ee5d7
BLAKE2b-256 24da9def173d3191e86acf8aeb35658aaaeee289a14cfd7eac706eb360275a9a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page