-
Notifications
You must be signed in to change notification settings - Fork 36
/
Copy path.pre-commit-config.yaml
50 lines (49 loc) · 1.64 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
exclude: 'POLICIES.md'
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: check-case-conflict
- id: check-yaml
- id: check-shebang-scripts-are-executable
- id: check-json
- id: end-of-file-fixer
- id: trailing-whitespace
- repo: local
hooks:
- id: opa-check
name: OPA check
description: Check syntax of staged Rego files
entry: opa check
args: [ '--v0-compatible', 'policy', '--strict' ]
pass_filenames: false
language: system
files: (\.rego)$
- id: opa-fmt
name: OPA fmt
description: Formats Rego policy using opa fmt
entry: opa fmt
args: [ '--v0-compatible', '--write', 'policy' ]
language: system
files: (\.rego)$
- id: regal-lint
name: regal lint
description: Lint the rego
entry: regal lint
args: [ 'policy' ]
language: system
- id: konstraint-doc
name: konstraint-doc
description: Generate docs
entry: konstraint doc --output POLICIES.md
language: system
pass_filenames: false
- repo: https://gitlab.cee.redhat.com/infosec-public/developer-workbench/tools.git
rev: rh-pre-commit-2.3.2
hooks:
# If you have not run this hook on your system before, it may prompt you to
# log in for patterns, and you will need to try again.
#
# Docs: https://source.redhat.com/departments/it/it-information-security/leaktk/leaktk_components/rh_pre_commit
- id: rh-pre-commit
- id: rh-pre-commit.commit-msg # Optional for commit-msg attestation