-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.pre-commit-config.yaml
77 lines (67 loc) · 1.83 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
# See https://pre-commit.com for more information
# NOTE: must run:
# cd $SIDECHAIN
# pip install pre-commit
# curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
# pre-commit install --hook-type pre-commit
# pre-commit install --hook-type pre-push
default_install_hook_types:
- pre-commit
- pre-push
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.2.0
hooks:
- id: check-added-large-files
stages: [commit, push]
- id: check-merge-conflict
args: ["--assume-in-merge"]
stages: [commit, push]
- id: check-symlinks
stages: [commit, push]
- id: check-toml
stages: [commit, push]
- id: check-yaml
args: ["--allow-multiple-documents"]
stages: [commit, push]
- id: trailing-whitespace
stages: [commit, push]
- repo: local
hooks:
- id: cargo-clippy
name: cargo-clippy
description: lint the minimal changed packages in the cargo workspace
stages: [commit]
entry: cargo
args:
- clippy
- --verbose
- --fix
- --allow-dirty
- --allow-staged
- --all-features
language: system
types: [rust]
always_run: true
pass_filenames: false
- id: cargo-clippy
name: cargo-clippy
description: lint the minimal changed packages in the cargo workspace
stages: [push]
entry: cargo
args:
- clippy
- --verbose
- --all-features
language: system
types: [rust]
always_run: true
pass_filenames: false
- id: cargo-fmt
name: cargo-fmt
description: format files with cargo fmt
stages: [commit, push]
entry: cargo fmt
language: system
types: [rust]
args: ["--"]