-
-
Notifications
You must be signed in to change notification settings - Fork 17
/
Copy path.pre-commit-hooks.yaml
61 lines (53 loc) · 1.48 KB
/
.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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
---
- id: circleci-config-validate
name: CircleCI config validation
description: Test if the CircleCI config is well formed.
entry: hooks/circleci-config-validate.sh
language: script
files: ^.circleci/*.yml$
- id: go-fmt
name: go fmt
description: Runs `go fmt` and asserts no changes are needed.
entry: hooks/go-fmt.sh
language: script
files: \.go$
- id: go-test
name: go test
description: Runs `go test` and asserts no tests are failing.
entry: hooks/go-test.sh
language: script
files: \.go$
- id: go-mod-tidy
name: go mod tidy
description: Runs `go mod tidy` to ensure `go.mod` matches the project source.
entry: hooks/go-mod-tidy.sh
language: script
files: \.go$
- id: go-generate
name: go generate
description: Runs `go generate` against the projects go files.
entry: hooks/go-generate.sh
language: script
files: \.go$
always_run: true
- id: forbid-binary
name: Forbid binaries
description: Forbid binary files from being committed
entry: hooks/forbid-binary.sh
language: script
types: ['binary']
- id: shellcheck
name: Test shell scripts with shellcheck
description: Shell scripts conform to shellcheck
entry: hooks/shellcheck.sh
language: script
types: [shell]
exclude_types: [csh, perl, python, ruby, tcsh, zsh]
args: [-e, SC1091]
- id: shfmt
name: Check shell style with shfmt
language: script
entry: hooks/shfmt.sh
types: [shell]
exclude_types: [csh, perl, python, ruby, tcsh, zsh]
args: ['-l', '-i', '2', '-ci']