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:
.pre-commit-config.yaml
repos:
- repo: https://github.com/rvben/rumdl-pre-commit
rev: v0.0.222 # Use latest version
hooks:
- id: rumdl # Lint only
- id: rumdl-fmt # Auto-format
Then install the hooks:
Available Hooks¶
rumdl¶
Lints files and fails if any issues are found.
rumdl-fmt¶
Auto-formats files and fails if unfixable issues remain.
Recommended for CI
Use rumdl-fmt for the best developer experience - it auto-fixes what it can and only fails when manual intervention is needed.
Configuration¶
Custom Arguments¶
File Filtering¶
Force Exclude¶
By default, pre-commit passes files explicitly, which bypasses exclude patterns in your config. To enforce excludes:
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: