-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy path.pre-commit-hooks.yaml
49 lines (44 loc) · 1.12 KB
/
.pre-commit-hooks.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
- id: opa-test
name: OPA test
description: Runs OPA unit tests on rego source files
entry: opa test
args: ['.']
pass_filenames: false
language: system
files: (\.rego)$
- id: opa-fmt
name: OPA fmt
description: Formats Rego policy using opa fmt
entry: opa fmt
args: [-w]
language: system
files: (\.rego)$
- id: opa-check
name: OPA check
description: Check syntax of staged Rego files
entry: opa check
args: ['.', '--strict']
pass_filenames: false
language: system
files: (\.rego)$
- id: conftest-test
name: Conftest test
description: Run `conftest test` on staged config files
entry: conftest test
language: system
files: (\.rego|\.yml|\.yaml|\.json|\.ini|\.toml|\.conf|\.hcl|\.cue|\.edn|\.vcl|\.xml|\.jsonnet|Dockerfile)$
- id: conftest-fmt
name: Conftest fmt
description: Run `conftest fmt` on staged Rego files
entry: conftest fmt
language: system
args: ['.']
files: (\.rego)$
- id: conftest-verify
name: Conftest verify
description: Run `conftest verify` on rego files
entry: conftest verify
args: ['.']
pass_filenames: false
language: system
files: (\.rego)$