WH
whot/pre-commit-rust
Rust hooks for pre-commit
Notice
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 hooks for pre-commit
Rust tools package for pre-commit.
Using rust tools with pre-commit
- repo: https://github.com/FeryET/pre-commit-rust
rev: v1.1.1
hooks:
- id: fmt
- id: cargo-checkPassing arguments to rustfmt
- repo: https://github.com/FeryET/pre-commit-rust
rev: v1.1.1
hooks:
- id: fmt
args: ["--verbose", "--edition", "2018", "--"]Pre-push hooks
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.1
hooks:
- id: build
- id: testYou can then install these hooks via:
pre-commit install --hook-type pre-push