This is a fork of the original repo, which as of now, has been unmaintained for a few years. I'm trying to customize the hooks that I use the most, ping at me via the issues board if you needed any change or noticed anything.
Rust tools package for pre-commit.
- repo: https://github.com/FeryET/pre-commit-rust
rev: v1.1.0
hooks:
- id: fmt
- id: cargo-check
- repo: https://github.com/FeryET/pre-commit-rust
rev: v1.1.0
hooks:
- id: fmt
args: ["--verbose", "--edition", "2018", "--"]
You can use test
and build
pre-commit hooks to make sure you are not pushing a faulty code to the remote.
- repo: https://github.com/FeryET/pre-commit-rust
rev: v1.1.0
hooks:
- id: build
- id: test
You can then install these hooks via:
pre-commit install --hook-type pre-push