Skip to content

Commit 2c7d026

Browse files
author
Fadi Hadzh
authored
Merge pull request doublify#9 from DanielChabrowski/format-arguments
Allow passing fmt arguments
2 parents c9d5fe3 + 2630d35 commit 2c7d026

File tree

3 files changed

+15
-5
lines changed

3 files changed

+15
-5
lines changed

Diff for: .pre-commit-config.yaml

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
repos:
2-
- repo: git://github.com/pre-commit/pre-commit-hooks
3-
rev: v1.4.0
2+
- repo: https://github.com/pre-commit/pre-commit-hooks
3+
rev: v3.1.0
44
hooks:
55
- id: check-byte-order-marker
66
- id: check-case-conflict
@@ -11,6 +11,6 @@ repos:
1111
- id: mixed-line-ending
1212
- id: trailing-whitespace
1313
- repo: https://github.com/pre-commit/pre-commit
14-
rev: v1.10.4
14+
rev: v2.5.1
1515
hooks:
1616
- id: validate_manifest

Diff for: .pre-commit-hooks.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
- id: fmt
22
name: fmt
33
description: Format files with cargo fmt.
4-
entry: cargo fmt --
4+
entry: cargo fmt
55
language: system
66
types: [rust]
7-
args: []
7+
args: ['--']
88
- id: cargo-check
99
name: cargo check
1010
description: Check the package for errors.

Diff for: README.md

+10
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,13 @@
1111
- id: fmt
1212
- id: cargo-check
1313
```
14+
15+
## Passing arguments to rustfmt
16+
17+
```yaml
18+
- repo: https://github.com/doublify/pre-commit-rust
19+
rev: master
20+
hooks:
21+
- id: fmt
22+
args: ['--verbose', '--edition', '2018', '--']
23+
```

0 commit comments

Comments
 (0)