|
| 1 | +# Canonical pre-commit configuration for tfroot-* repositories. |
| 2 | +# This file is bundled into the tfroot-runner container image to pre-cache hooks. |
| 3 | +# It is also fetched by the shared OpenTofu workflow at CI time. |
| 4 | +# |
| 5 | +# To update hooks for all tfroot repos, modify this file and rebuild the image. |
| 6 | +repos: |
| 7 | + - repo: https://github.com/compilerla/conventional-pre-commit |
| 8 | + rev: v4.3.0 |
| 9 | + hooks: |
| 10 | + - id: conventional-pre-commit |
| 11 | + stages: [commit-msg] |
| 12 | + - repo: https://github.com/antonbabenko/pre-commit-terraform |
| 13 | + rev: v1.105.0 |
| 14 | + hooks: |
| 15 | + - id: terraform_validate |
| 16 | + args: |
| 17 | + - --hook-config=--retry-once-with-cleanup=true |
| 18 | + - --args=-no-color |
| 19 | + - --tf-init-args=-reconfigure |
| 20 | + - --tf-init-args=-upgrade |
| 21 | + - --tf-init-args=-backend=false |
| 22 | + - id: terraform_tflint |
| 23 | + args: |
| 24 | + - --args=--minimum-failure-severity=error |
| 25 | + - --args=--config=__GIT_WORKING_DIR__/.tflint.hcl |
| 26 | + - id: terraform_checkov |
| 27 | + args: |
| 28 | + - --args=--config-file __GIT_WORKING_DIR__/.checkov.yml |
| 29 | + - id: terraform_fmt |
| 30 | + args: |
| 31 | + - --args=-no-color |
| 32 | + - --args=-diff |
| 33 | + - --args=-recursive |
| 34 | + - id: terraform_docs |
| 35 | + args: |
| 36 | + - --args=--config=.terraform-docs.yml |
| 37 | + - repo: https://github.com/pre-commit/pre-commit-hooks |
| 38 | + rev: v6.0.0 |
| 39 | + hooks: |
| 40 | + - id: check-case-conflict |
| 41 | + - id: check-merge-conflict |
| 42 | + - id: check-symlinks |
| 43 | + - id: check-vcs-permalinks |
| 44 | + - id: destroyed-symlinks |
| 45 | + - id: detect-private-key |
| 46 | + - id: end-of-file-fixer |
| 47 | + exclude: README.md |
| 48 | + - id: mixed-line-ending |
| 49 | + - id: trailing-whitespace |
0 commit comments