-
Notifications
You must be signed in to change notification settings - Fork 11
/
.pre-commit-config.yaml
89 lines (89 loc) · 2.64 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
82
83
84
85
86
87
88
89
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.3.0
hooks:
- id: check-added-large-files
exclude: .github/demo.gif
- id: check-case-conflict
- id: check-executables-have-shebangs
- id: check-json
- id: check-merge-conflict
- id: check-shebang-scripts-are-executable
- id: check-symlinks
- id: check-toml
- id: check-vcs-permalinks
- id: check-xml
- id: check-yaml
args:
- --allow-multiple-documents
- id: destroyed-symlinks
- id: detect-aws-credentials
- id: detect-private-key
- id: end-of-file-fixer
exclude: ^api/proto/gen/
- id: fix-byte-order-marker
exclude: ^api/proto/gen/
- id: no-commit-to-branch
- id: pretty-format-json
args:
- --autofix
- id: trailing-whitespace
- id: check-ast
- id: check-builtin-literals
- id: debug-statements
- id: double-quote-string-fixer
- id: fix-encoding-pragma
exclude: ^api/proto/gen/
- repo: https://github.com/golangci/golangci-lint
rev: v1.50.1
hooks:
- id: golangci-lint
args:
- --config
- .golangci.yaml
- repo: https://github.com/macisamuele/language-formatters-pre-commit-hooks
rev: v2.4.0
hooks:
- id: pretty-format-golang
args:
- --autofix
exclude: ^api/proto/gen/
- repo: https://github.com/Yelp/detect-secrets
rev: v1.4.0
hooks:
- id: detect-secrets
args:
- --exclude-files
- ^.*/zz_generated\.deepcopy\.go$
- --exclude-files
- ^.*/.*\.pb\.go$
- --exclude-files
- ^.*/.*\.pb\..*\.go$
- --exclude-files
- ^.*/.*\.swagger\.json$
- --exclude-files
- ^.*/.*_pb2\.py$
- --exclude-files
- ^.*/.*_pb2_grpc\.py$
- --exclude-files
- ^config/.*\.yaml$
- repo: https://github.com/compilerla/conventional-pre-commit
rev: v2.1.1
hooks:
- id: conventional-pre-commit
stages: [ commit-msg ]
args: [ "feat", "fix", "docs", "style", "refactor", "perf", "test", "build", "ci", "chore", "revert" ]
- repo: local
hooks:
- id: check-headers-for-license
name: Check headers for license
entry: ./hack/check-headers-for-license.sh
language: script
pass_filenames: false
stages: [ commit ]
- id: licenses-check-allowed
name: Check licenses are allowed
entry: ./hack/licenses-check-allowed.sh
language: script
pass_filenames: false
stages: [ commit ]