-
Notifications
You must be signed in to change notification settings - Fork 40
/
.pre-commit-config.yaml
76 lines (73 loc) · 2.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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
exclude: ^vendor/
repos:
- repo: local
hooks:
- id: make-verify
name: make-verify
language: system
entry: make
args: ['verify']
pass_filenames: false
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: check-added-large-files
- id: fix-byte-order-marker
- id: check-case-conflict
- id: check-executables-have-shebangs
- id: check-shebang-scripts-are-executable
- id: check-merge-conflict
- id: mixed-line-ending
- id: check-yaml
args: [-m]
exclude: ^test/e2e/testdata|^vendor
- id: check-json
- id: detect-private-key
- id: end-of-file-fixer
- id: no-commit-to-branch
- id: trailing-whitespace
- repo: https://github.com/openstack/bashate.git
rev: 2.1.1
hooks:
- id: bashate
# Run bashate check for all bash scripts
# Ignores the following rules:
# E006: Line longer than 79 columns (as many scripts use jinja
# templating, this is very difficult)
# E040: Syntax error determined using `bash -n` (as many scripts
# use jinja templating, this will often fail and the syntax
# error will be discovered in execution anyway)
# E020: Function declaration not in format ^function name {$
# E011: Then keyword is not on same line as if or elif keyword
# E012: here doc didn't end before EOF
entry: bashate --error . --ignore=E006,E040,E020,E012,E011
- repo: https://github.com/golangci/golangci-lint
rev: v1.62.2
hooks:
- id: golangci-lint
entry: golangci-lint run --fix
args:
- "--modules-download-mode=vendor"
- "--timeout=20m"
types: [go]
language: golang
require_serial: true
pass_filenames: false
- repo: https://github.com/codespell-project/codespell
rev: v2.3.0
hooks:
- id: codespell
args: [
"--ignore-words-list",
"afterall,NotIn",
"--check-filenames",
"--check-hidden",
"-S",
"test/e2e/testdata/*,go.sum,go.mod",
]
pass_filenames: true
- repo: https://github.com/alessandrojcm/commitlint-pre-commit-hook
rev: v9.19.0
hooks:
- id: commitlint
stages: [commit-msg]