pre-commit-rust/README.md

24 lines
492 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
2024-01-01 11:45:56 +00:00
- repo: https://git.xenia.me.uk/utils/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
2024-01-01 11:45:56 +00:00
- repo: https://git.xenia.me.uk/utils/pre-commit-rust
2020-06-20 02:04:58 +01:00
rev: master
hooks:
- id: fmt
args: ['--verbose', '--edition', '2018', '--']
```