forked from nginxinc/nginx-gateway-fabric
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.pre-commit-config.yaml
68 lines (61 loc) · 2.12 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
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
hooks:
- id: trailing-whitespace
exclude: (^tests/results/|\.avdl$|_generated.go$)
- id: end-of-file-fixer
- id: check-yaml
args: [--allow-multiple-documents]
exclude: (^charts/nginx-gateway-fabric/templates)
- id: check-added-large-files
- id: check-merge-conflict
- id: check-case-conflict
- id: check-vcs-permalinks
- id: check-json
- id: pretty-format-json
args: [--autofix, --no-sort-keys, --no-ensure-ascii]
- id: mixed-line-ending
args: [--fix=lf]
- id: no-commit-to-branch
- id: detect-private-key
exclude: (^examples/|^docs/|.*_test.go$)
- repo: https://github.com/gitleaks/gitleaks
rev: v8.18.4
hooks:
- id: gitleaks
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v4.0.0-alpha.8
hooks:
- id: prettier
additional_dependencies:
- [email protected] # https://github.com/pre-commit/pre-commit/issues/3133
types:
- javascript
- repo: https://github.com/golangci/golangci-lint
rev: v1.59.1
hooks:
- id: golangci-lint-full
name: golangci-lint-root
alias: golangci-lint-root
- id: golangci-lint-full
name: golangci-lint-tests
alias: golangci-lint-tests
entry: bash -c 'cd tests && golangci-lint run --fix --config $OLDPWD/.golangci.yml'
# Rules are in .markdownlint-cli2.yaml file
# See https://github.com/DavidAnson/markdownlint/blob/main/doc/Rules.md for rule descriptions
- repo: https://github.com/DavidAnson/markdownlint-cli2
rev: v0.13.0
hooks:
- id: markdownlint-cli2
# Rules are in .yamllint.yaml file
# See https://yamllint.readthedocs.io/en/stable/rules.html# for rule descriptions
- repo: https://github.com/adrienverge/yamllint.git
rev: v1.35.1
hooks:
- id: yamllint
ci:
skip: [golangci-lint-full, prettier, markdownlint-cli2, yamllint]
autofix_prs: false