Pre-commit Integration¶
Use rumdl as a pre-commit hook to catch issues before they're committed.
Setup¶
Add to your .pre-commit-config.yaml:
repos:
- repo: https://github.com/rvben/rumdl-pre-commit
rev: v0.2.39 # Use latest version
hooks:
- id: rumdl # Lint only; add args [--fix] to auto-fix
- id: rumdl-fmt # Pure format, always exits 0
Then install the hooks:
Available Hooks¶
rumdl¶
Lints files and exits 1 if violations are found. Non-destructive by default. Use this as your primary hook.
To auto-fix violations in place, opt in with args (the same model as ruff's linter hook):
rumdl-fmt¶
Formats files in place and always exits 0. Relies on pre-commit's file-change detection to signal failures. Use alongside rumdl when you want to separate formatting from linting.
Recommended setup
Use rumdl first for lint coverage, then rumdl-fmt for formatting - the same pattern as ruff + ruff-format.
Configuration¶
Custom Arguments¶
File Filtering¶
No Exclude¶
Exclude patterns from your config are always respected by default (as of v0.0.156).
To disable all configured exclusions, use --no-exclude flag.
Stages¶
Run hooks at different stages:
Running Manually¶
Updating¶
Troubleshooting¶
Slow First Run¶
The first run downloads and installs rumdl. Subsequent runs use the cached version.
Files Not Being Checked¶
Check your files pattern matches your Markdown files:
Conflicts with Other Formatters¶
Run rumdl last to ensure consistent formatting: