A pre-commit hook for rumdl, a fast Markdown linter and formatter written in Rust.
To use rumdl with pre-commit, add the following to your .pre-commit-config.yaml:
repos:
- repo: https://github.com/rvben/rumdl-pre-commit
rev: v0.3.5
hooks:
- id: rumdl-check # Lint only; add args [--fix] to auto-fix
- id: rumdl-fmt # Format in placeThe recommended hooks are:
rumdl-check- Lints files and exits 1 if violations are found. Non-destructive by default; addargs: [--fix]to auto-fix in place and fail if violations remain (the same opt-in model as ruff's linter hook).rumdl-fmt- Formats files in place and exits 0 for remaining lint violations. Relies on pre-commit's file-change detection. Use alongsiderumdl-checkfor the ruff-style split. Execution and configuration errors can still cause a nonzero exit.
The legacy rumdl ID remains available as an alias for rumdl-check; existing configurations do not need to change.
For a single hook that applies fixes and fails if unfixable violations remain, use:
- id: rumdl-check
args: [--fix]Pre-commit also fails the run when a hook changes files, so review and stage the fixes before committing again.
The rumdl-check hook runs rumdl check and rumdl-fmt runs rumdl fmt; pass any flag of that command through args. For example, to auto-fix in place and skip the configured code-block tools:
- id: rumdl-check
args: [--fix, --no-code-block-tools]See the pre-commit page in the rumdl docs for more examples, including the code-block tool modes.
When you run pre-commit install or pre-commit run, pre-commit will automatically install rumdl in an isolated Python environment using pip. You do not need to install rumdl manually.
MIT (see LICENSE)