Skip to content

Commit 7433e13

Browse files
feat(terraform_fmt): Add support for .tftest.hcl and .tfmock.hcl formatting (antonbabenko#911)
Both supported in https://github.com/hashicorp/terraform/blob/0c63fb2b097edcd5cb1a91322765a414206fbea2/internal/command/fmt.go#L30-L35 --------- Co-authored-by: Maksym Vlasov <[email protected]>
1 parent a134d16 commit 7433e13

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

.pre-commit-hooks.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,9 @@
1313
Rewrites all Terraform configuration files to a canonical format.
1414
entry: hooks/terraform_fmt.sh
1515
language: script
16-
files: \.(tf|tofu|tfvars)$
16+
# Supported extensions by Terraform specified in
17+
# https://github.com/hashicorp/terraform/blob/0c63fb2b097edcd5cb1a91322765a414206fbea2/internal/command/fmt.go#L30-L35
18+
files: \.(tf|tofu|tfvars|tftest\.hcl|tfmock\.hcl)$
1719
exclude: \.terraform/.*$
1820

1921
- id: terraform_docs

0 commit comments

Comments
 (0)