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.3.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.

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.2.tar.gz (161.9 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.2-py3-none-any.whl (45.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: markdown_checker-1.2.2.tar.gz
  • Upload date:
  • Size: 161.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.28 {"installer":{"name":"uv","version":"0.11.28","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.2.tar.gz
Algorithm Hash digest
SHA256 edcac4757cafc49786fc55429505707b9087b4c3bb6d64b3e09aae45764241fd
MD5 dc00d8065ea35f2b14a77fa6c53eae33
BLAKE2b-256 7ce77d704e982d82a4ea1b7fe38083071d0defe6d61da545879f2f5840c6b0f7

See more details on using hashes here.

File details

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

File metadata

  • Download URL: markdown_checker-1.2.2-py3-none-any.whl
  • Upload date:
  • Size: 45.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.28 {"installer":{"name":"uv","version":"0.11.28","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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 08f32cd783876148387e80746ed0720edddef462395b6862bef3cd0f9367e490
MD5 4da1123590b906f5f5b6a59e381a3938
BLAKE2b-256 84e586f3b6e2f0081657b1a3fa6072c1307829a475f0895d1c64d8a91027db71

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