-
Notifications
You must be signed in to change notification settings - Fork 476
/
.pre-commit-config.yaml
81 lines (80 loc) · 2.21 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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
---
# For use with pre-commit.
# See usage instructions at https://pre-commit.com
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
hooks:
- id: check-toml
stages: [commit]
- id: check-yaml
stages: [commit]
- id: check-merge-conflict
stages: [commit]
- id: check-case-conflict
stages: [commit]
- id: detect-private-key
stages: [commit]
- id: mixed-line-ending
stages: [commit]
args: ["--fix=lf"]
- id: trailing-whitespace
stages: [commit]
args: [--markdown-linebreak-ext=md]
- repo: https://github.com/crate-ci/committed
rev: v1.0.20
hooks:
- id: committed
stages: [commit-msg]
# cspell is dictionary based
# Dictionary: A confidence rating is given for how close a word is to one in a dictionary
- repo: https://github.com/streetsidesoftware/cspell-cli
rev: v8.3.0
hooks:
- id: cspell
# typos is corrections based
# Corrections: Known misspellings that map to their corresponding dictionary word
- repo: https://github.com/crate-ci/typos
rev: v1.18.2
hooks:
- id: typos
pass_filenames: false
args: [] # this prevents typos from being autocorrected (so you have a chance to review them)
- repo: local
hooks:
- id: cargo-fmt
name: cargo fmt
description: Run cargo fmt
entry: cargo fmt
language: system
types: [rust]
args: ["--"]
- id: cargo-clippy
name: cargo clippy
description: Run cargo clippy
entry: cargo clippy
language: system
types: [rust]
pass_filenames: false
args: ["--all-features", "--", "-D", "warnings", "-A", "unknown-lints"]
- id: cargo-test
name: cargo test
description: Run cargo test
entry: cargo test
language: system
types: [rust]
pass_filenames: false
args: ["--all-features", "--"]
- repo: local
hooks:
- id: verify_icon_files
name: verify_icon_files
description: Run verify_icon_files.sh
entry: ./verify_icon_files.sh
language: system
files: |
(?x)^(
src/icons\.rs|
files/icons/.*\.toml
)$
pass_filenames: false