-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.pre-commit-config.yaml
52 lines (46 loc) · 1.37 KB
/
.pre-commit-config.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
repos:
- repo: https://github.com/commitizen-tools/commitizen
rev: v2.39.1
hooks:
- id: commitizen
- id: commitizen-branch
stages: [ push ]
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v2.3.0
hooks:
- id: check-merge-conflict
- id: check-symlinks
- id: check-yaml
- id: check-json
- id: end-of-file-fixer
- id: trailing-whitespace
# - repo: https://github.com/igorshubovych/markdownlint-cli
# rev: v0.31.1
# hooks:
# - id: markdownlint
- repo: local
hooks:
- id: cargo_fmt
name: cargo fmt
language: system
types: [ file, rust ]
entry: ./_scripts/cargo.sh fmt
pass_filenames: false
- id: cargo_clippy_check
name: cargo clippy
language: system
types: [ file, rust ]
entry: ./_scripts/cargo.sh clippy --all-targets --all -- -D warnings # Use -D warnings option to ensure the job fails when encountering warnings
pass_filenames: false
- id: cargo_check
name: cargo check
language: system
types: [ file, rust ]
entry: ./_scripts/cargo.sh check --all-targets --all
pass_filenames: false
- id: test
name: test
language: system
types: [ file, rust ]
entry: ./_scripts/cargo.sh test --all
pass_filenames: false