pre-commit-rust/README.md

24 lines
488 B
Markdown
Raw Normal View History

2017-04-13 13:30:33 +01:00
# Rust hooks for pre-commit
[Rust](https://www.rust-lang.org) tools package for [pre-commit](https://pre-commit.com).
2017-04-13 13:30:33 +01:00
## Using rust tools with pre-commit
```yaml
- repo: https://github.com/doublify/pre-commit-rust
rev: master
2017-04-13 13:30:33 +01:00
hooks:
- id: fmt
2019-05-06 00:19:52 +01:00
- id: cargo-check
2017-04-13 13:30:33 +01:00
```
2020-06-20 02:04:58 +01:00
## Passing arguments to rustfmt
```yaml
- repo: https://github.com/doublify/pre-commit-rust
rev: master
hooks:
- id: fmt
args: ['--verbose', '--edition', '2018', '--']
```