Simple pre-commit hooks for rust
Current hooks are:
-
rustfmt
- run rustfmt on all rust text files and change the file -
rustfmt-check
- run rustfmt in check mode and report failure (no files are changed)
Add the following to .pre-commit-config.yaml
repos:
- repo: https://github.com/billyrayvalentine/pre-commit-rust-hook
rev: 0.1.0
hooks:
- id: rustfmt