Skip to content

Commit af563d4

Browse files
committed
fix: reorder pre-commit hooks to prevent terraform_docs/end-of-file-fixer loop
1 parent 8d412ef commit af563d4

2 files changed

Lines changed: 16 additions & 12 deletions

File tree

.pre-commit-config.yaml

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,6 @@ repos:
44
hooks:
55
- id: conventional-pre-commit
66
stages: [commit-msg]
7-
- repo: https://github.com/pre-commit/pre-commit-hooks
8-
rev: v6.0.0
9-
hooks:
10-
- id: check-case-conflict
11-
- id: check-merge-conflict
12-
- id: check-symlinks
13-
- id: check-vcs-permalinks
14-
- id: destroyed-symlinks
15-
- id: detect-private-key
16-
- id: end-of-file-fixer
17-
- id: mixed-line-ending
18-
- id: trailing-whitespace
197
- repo: https://github.com/antonbabenko/pre-commit-terraform
208
rev: v1.104.0
219
hooks:
@@ -40,3 +28,15 @@ repos:
4028
- id: terraform_docs
4129
args:
4230
- --args=--config=.terraform-docs.yml
31+
- repo: https://github.com/pre-commit/pre-commit-hooks
32+
rev: v6.0.0
33+
hooks:
34+
- id: check-case-conflict
35+
- id: check-merge-conflict
36+
- id: check-symlinks
37+
- id: check-vcs-permalinks
38+
- id: destroyed-symlinks
39+
- id: detect-private-key
40+
- id: end-of-file-fixer
41+
- id: mixed-line-ending
42+
- id: trailing-whitespace

.terraform-docs.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@ formatter: "markdown"
33
output:
44
file: "README.md"
55
mode: inject
6+
template: |-
7+
<!-- BEGIN_TF_DOCS -->
8+
{{ .Content }}
9+
<!-- END_TF_DOCS -->
610
711
settings:
812
color: false

0 commit comments

Comments
 (0)