-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
106 lines (105 loc) · 2.98 KB
/
.pre-commit-config.yaml
File metadata and controls
106 lines (105 loc) · 2.98 KB
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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
fail_fast: false
exclude: '^.venv/.*'
default_install_hook_types: [pre-commit, pre-push, commit-msg, prepare-commit-msg]
default_stages: [pre-commit]
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: check-ast
- id: check-toml
- id: check-yaml
exclude: |
(?x)(^helm/.*/templates)
- id: check-json
- id: end-of-file-fixer
- id: fix-byte-order-marker
- id: trailing-whitespace
- id: check-executables-have-shebangs
- id: check-symlinks
- id: destroyed-symlinks
- id: mixed-line-ending
- id: detect-aws-credentials
- id: detect-private-key
- id: fix-byte-order-marker
- id: requirements-txt-fixer
- repo: local
hooks:
- id: black
name: black
entry: make black
language: system
types_or: [python, pyi, jupyter]
pass_filenames: false
- id: ruff
name: ruff
entry: make ruff
language: system
types_or: [python, pyi, jupyter]
pass_filenames: false
- id: mypy
name: mypy
entry: make mypy
language: system
types_or: [python, pyi, jupyter]
pass_filenames: false
- id: trivy
name: trivy
entry: make tf-trivy
language: system
files: \.tf(vars)?$
pass_filenames: false
- id: tf-format
name: tf-format
entry: make tf-format
language: system
files: (\.tf|\.tfvars)$
exclude: \.terraform/.*$
pass_filenames: false
- id: tf-lint
name: tf-lint
entry: make tf-lint
language: system
files: (\.tf|\.tfvars)$
exclude: \.terraform/.*$
pass_filenames: false
- id: shellcheck
name: shellcheck
entry: make shellcheck
language: system
files: (\.sh)$
pass_filenames: false
- id: ansible-lint
name: ansible-lint
entry: make ansible-lint
language: system
files: (.*/)?ansible/.*(\.yml)$
pass_filenames: false
- id: hadolint
name: docker lint
entry: make hadolint
language: system
files: (/Dockerfile)$
pass_filenames: false
- id: secrets
name: git secrets
entry: scripts/check-secrets.sh
language: script
pass_filenames: false
- id: secrets-commit-msg
name: git secrets check commit message
entry: scripts/check-secrets.sh commit-msg
language: system
stages: [commit-msg]
- id: secrets-prep-commit-msg
name: git secrets pre check commit message
entry: scripts/check-secrets.sh commit-msg
language: system
stages: [prepare-commit-msg]
- id: commit-msg
name: validate commit message contains a ticket
language: pygrep
entry: '(?i)\A(?!(odin|mesh|obs|spinecore)-[0-9]+)'
args: [--multiline]
stages: [commit-msg]
types: [text]