forked from doublify/pre-commit-rust
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.pre-commit-hooks.yaml
55 lines (55 loc) · 1.22 KB
/
.pre-commit-hooks.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
- id: fmt
name: fmt
description: Format files with cargo fmt.
entry: cargo fmt
language: system
types: [ rust ]
args: [ "--" ]
- id: cargo-check
name: cargo check
description: Check the package for errors.
entry: cargo check
language: system
types: [ rust ]
pass_filenames: false
- id: clippy
name: clippy
description: Lint rust sources
entry: cargo clippy
language: system
args: [ "--", "-D", "warnings" ]
types: [ rust ]
pass_filenames: false
- id: machete
name: machete
description: Lint rust sources for unused dependencies.
entry: cargo machete
language: system
args: [ "--" ]
types: [ rust ]
pass_filenames: false
- id: llvm-cov
name: llvm-cov
description: Run tests with code coverage.
entry: cargo machete
language: system
args: [ "--" ]
types: [ rust ]
pass_filenames: false
- id: sort
name: sort
description: Sort entries in cargo toml.
entry: cargo machete
language: system
args: [ "--" ]
types: [ rust ]
pass_filenames: false
- id: lizard
name: lizard
description: Run lizard on rust files
entry: lizard
language: python
types: [ rust ]
args: [ "--warnings_only", "--languages rust", "--length 40" ]
pass_filenames: true
require_serial: false