forked from doublify/pre-commit-rust
-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy path.pre-commit-hooks.yaml
40 lines (40 loc) · 899 Bytes
/
.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
- id: fmt
name: fmt
description: Format files with cargo fmt.
entry: cargo fmt
language: system
types_or: ["rust", "file"]
files: '(.rs|Cargo.toml)$'
args: ["--"]
- id: cargo-check
name: cargo check
description: Check the package for errors.
entry: cargo check
language: system
types_or: ["rust", "file"]
files: '(.rs|Cargo.toml|Cargo.lock)$'
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: test
name: test
description: Run tests with cargo test
entry: cargo test
language: system
types: [rust]
args: ["--"]
stages: ["push"]
- id: build
name: build
description: Build using cargo build
language: system
types: ["rust"]
stages: ["push", "manual",]
entry: cargo build
pass_filenames: false