-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #313 from garethahealy/main
added pre-commit
- Loading branch information
Showing
1 changed file
with
28 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
repos: | ||
- repo: local | ||
hooks: | ||
- id: opa-check | ||
name: OPA check | ||
description: Check syntax of staged Rego files | ||
entry: opa check | ||
args: [ 'policy', '--strict' ] | ||
pass_filenames: false | ||
language: system | ||
- id: opa-fmt | ||
name: OPA fmt | ||
description: Formats Rego policy using opa fmt | ||
entry: opa fmt | ||
args: [ '--write', 'policy' ] | ||
language: system | ||
- 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 |