Collection of pre-commit hooks to be used with Yelp's pre-commit framework
- Terraform format
- Terraform validate
- Prometheus rules validation
- Prometheus configuration validation
Check the hooks manifest to know more
Install the pre-commit package
brew install pre-commit
For operating systems, other than macOS, check the official documentation
Step into the repo you want to have the pre-commit hooks installed and run:
cat <<EOF > .pre-commit-config.yaml
- repo: git://github.com/kintoandar/pre-commit.git
sha: v2.1.2
hooks:
- id: terraform_fmt
- id: terraform_validate
- id: prometheus_check_rules
- id: prometheus_check_config
EOF
Install the pre-commit hook
pre-commit install
Made with