forked from openshift/addon-operator
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.pre-commit-config.yaml
60 lines (55 loc) · 1.33 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
exclude: |
(?x)(
(^vendor/)|
(.deepcopy.go$)|
(mage_output_file.go$)
)
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v2.4.0
hooks:
- id: check-added-large-files
- id: check-case-conflict
- id: check-json
- id: check-merge-conflict
- id: check-symlinks
- id: detect-private-key
- id: end-of-file-fixer
- id: pretty-format-json
args:
- --autofix
- id: trailing-whitespace
- repo: https://github.com/dnephin/pre-commit-golang
rev: v0.3.5
hooks:
- id: go-fmt
- repo: local
hooks:
- id: goimports
name: goimports
entry: hack/ensure-and-run-goimports.sh
language: system
types: [go]
require_serial: true # mage does not like multiple parallel compiles
- id: golangci-lint
name: golangci-lint
entry: hack/ensure-and-run-golangci-lint.sh
language: script
pass_filenames: false
types: [go]
require_serial: true # mage does not like multiple parallel compiles
- id: go-mod-tidy
name: go-mod-tidy
entry: make tidy
language: system
exclude: ".*"
pass_filenames: false
always_run: true
- id: make-generate
name: make-generate
entry: make generate
language: system
exclude: ".*"
pass_filenames: false
always_run: true
require_serial: true # mage does not like multiple parallel compiles