forked from elastic/csp-security-policies
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.pre-commit-config.yaml
35 lines (32 loc) · 941 Bytes
/
.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
repos:
- repo: local
hooks:
- id: opa-fmt
name: OPA fmt
description: Formats Rego policy using opa fmt
entry: opa fmt
args: [ -w ]
language: system
files: (\.rego)$
# - id: opa-bundle
# name: OPA bundle
# description: Formats Rego policy using opa fmt
# entry: opa build
# args: [ -b, './bundle', -e, './bundle/compliance' ]
# language: system
# files: (\.rego)$
- id: opa-check
name: OPA check
description: Check syntax of staged Rego files
entry: opa check
args: [ -S, './bundle/compliance' ]
pass_filenames: false
language: system
files: (\.rego)$
- id: opa-test
name: OPA test
description: Runs OPA unit tests on rego source files
entry: opa test
args: [ -b, './bundle' ]
pass_filenames: false
language: system