Repository navigation
Expand file tree
/
Copy pathprek.toml
More file actions
111 lines (99 loc) · 3.4 KB
/
Copy pathprek.toml
File metadata and controls
111 lines (99 loc) · 3.4 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
107
108
109
110
111
minimum_prek_version = "0.5.5"
default_install_hook_types = ["pre-commit", "commit-msg"]
default_stages = ["pre-commit"]
exclude = '^(\.devbox/|\.task/|bin/|dist/|builds/|docs/node_modules/|docs/resources/)'
[[repos]]
repo = "builtin"
hooks = [
{ id = "check-executables-have-shebangs", stages = ["pre-commit", "manual"], groups = ["files"], priority = 10 },
{ id = "end-of-file-fixer", stages = ["pre-commit"], groups = ["files"], priority = 10 },
{ id = "trailing-whitespace", stages = ["pre-commit"], groups = ["files"], priority = 10 },
{ id = "check-merge-conflict", stages = ["pre-commit", "manual"], groups = ["files"], priority = 10 },
{ id = "check-json", stages = ["pre-commit", "manual"], groups = ["files"], priority = 10 },
{ id = "check-toml", stages = ["pre-commit", "manual"], groups = ["files"], priority = 10 },
{ id = "check-yaml", args = ["--allow-multiple-documents"], exclude = '^charts/[^/]+/templates/', stages = ["pre-commit", "manual"], groups = ["files"], priority = 10 },
# CI uses the manual stage to report whitespace issues without modifying files.
{ id = "end-of-file-fixer", alias = "end-of-file-check", name = "check end of files", args = ["--check"], stages = ["manual"], groups = ["files"], priority = 10 },
{ id = "trailing-whitespace", alias = "trailing-whitespace-check", name = "check trailing whitespace", args = ["--check"], stages = ["manual"], groups = ["files"], priority = 10 },
]
[[repos]]
repo = "local"
[[repos.hooks]]
id = "generated"
name = "Generate API code and manifests"
entry = "devbox run -- task generate manifests"
language = "system"
files = '^(api/|internal/|go\.(mod|sum)$)'
pass_filenames = false
require_serial = true
priority = 0
[[repos.hooks]]
id = "helm-docs"
name = "Generate Helm documentation"
entry = "devbox run -- task helm:docs"
language = "system"
files = '^charts/'
pass_filenames = false
priority = 10
[[repos.hooks]]
id = "helm-schema"
name = "Generate Helm values schema"
entry = "devbox run -- task helm:schema"
language = "system"
files = '^charts/'
pass_filenames = false
priority = 10
[[repos.hooks]]
id = "helm-lint"
name = "Lint Helm chart"
entry = "devbox run -- task helm:lint"
language = "system"
files = '^charts/'
pass_filenames = false
priority = 20
[[repos.hooks]]
id = "golangci-lint"
name = "Lint Go sources"
entry = "devbox run -- task lint"
language = "system"
types = ["go"]
pass_filenames = false
priority = 20
[[repos.hooks]]
id = "go-test"
name = "Run Go unit tests"
entry = "devbox run -- task test"
language = "system"
types = ["go"]
pass_filenames = false
priority = 30
[[repos.hooks]]
id = "actionlint"
name = "Validate GitHub Actions"
entry = "devbox run -- task lint:actions"
language = "system"
files = '^\.github/workflows/.*\.ya?ml$'
pass_filenames = false
priority = 20
[[repos.hooks]]
id = "docs"
name = "Validate documentation and generated API reference"
entry = "devbox run -- task docs:check"
language = "system"
files = '^(docs/|api/|charts/sops-operator/crds/|Taskfile\.yml$|devbox\.(json|lock)$)'
pass_filenames = false
priority = 40
[[repos.hooks]]
id = "conventional-commit"
name = "Check Conventional Commit message"
entry = "devbox run -- task lint:commit-message --"
language = "system"
stages = ["commit-msg"]
priority = 10
[[repos.hooks]]
id = "zizmor-fix"
name = "Security-lint GitHub Actions workflows with zizmor"
entry = "devbox run -- task lint:zizmor-fix"
language = "system"
stages = ["commit-msg"]
priority = 20