-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
63 lines (56 loc) · 1.56 KB
/
.pre-commit-config.yaml
File metadata and controls
63 lines (56 loc) · 1.56 KB
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
56
57
58
59
60
61
62
63
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
hooks:
- id: check-yaml
- id: trailing-whitespace
- id: check-added-large-files
- id: fix-byte-order-marker
- id: mixed-line-ending
- id: check-merge-conflict
# Format markdown docs.
- repo: https://github.com/executablebooks/mdformat
# Do this before other tools "fixing" the line endings
rev: 0.7.17
hooks:
- id: mdformat
args: [--number, --end-of-line=keep]
additional_dependencies:
- mdformat-toc
- mdformat-config
- mdformat-gfm
# Catch typos!
- repo: https://github.com/codespell-project/codespell
rev: v2.2.6
hooks:
- id: codespell
args: ["-L crate"]
- repo: local
hooks:
# Format rust code.
- id: cargo-fmt
name: cargo fmt
entry: cargo
args: ["fmt", "--all", "--"]
language: system
types: [rust]
pass_filenames: false
always_run: true
# Lint rust code.
- id: cargo-clippy
name: Run cargo clippy
entry: cargo
args: ["clippy", "--all-targets", "--all-features", "--", "-D", "warnings"]
language: system
types: [rust]
pass_filenames: false
always_run: true
# Check rust types.
- id: cargo-check
name: Run cargo check
entry: cargo
args: ["check", "--all-targets", "--all-features"]
language: system
types: [rust]
pass_filenames: false
always_run: true