Added basic pre-commit config

This commit is contained in:
Oscar Blue 2023-07-09 17:03:05 +01:00
parent 7ce67eb6e0
commit 21feeef318
2 changed files with 13 additions and 0 deletions

10
.pre-commit-config.yaml Normal file
View file

@ -0,0 +1,10 @@
repos:
- repo: https://github.com/gitleaks/gitleaks
rev: v8.16.1
hooks:
- id: gitleaks
- repo: https://github.com/antonbabenko/pre-commit-terraform
rev: v1.81.0 # Get the latest from: https://github.com/antonbabenko/pre-commit-terraform/releases
hooks:
- id: terraform_fmt
# - id: terraform_docs

View file

@ -1,5 +1,8 @@
CODE_PATH ?= .
pre-commit:
@cd $(CODE_PATH) && pre-commit run --files *
init:
@cd $(CODE_PATH) && terraform init -reconfigure -upgrade -backend-config=./backend.tfvars