Skip to content

Repository files navigation

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-rustrev: v1.2.1hooks:
- id: fmt
- id: cargo-check

Passing arguments to rustfmt

- repo: https://github.com/FeryET/pre-commit-rustrev: v1.2.1hooks:
- id: fmtargs: ["--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-rustrev: v1.2.1hooks:
- id: build
- id: test

You can then install these hooks via:

pre-commit install --hook-type pre-push

About

Rust hooks for pre-commit

Resources

Stars

26 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors