Skip to content

Commit ba7cf0e

Browse files
tvanrielTed van Riel
andauthored
feat(terraform_fmt): Add support for .tofutest.hcl and .tfquery.hcl files (#935)
OpenTofu has their own file pattern for defining tests: *.tofutest.hcl - https://opentofu.org/docs/cli/commands/test/#the-tftesthcl--tofutesthcl-file-structure And Terraform 1.14 introduces *.tfquery.hcl - https://github.com/hashicorp/terraform/blob/eae5ac13dd47eafd2d338b21db7311bbfa861b68/internal/command/fmt.go#L56 Co-authored-by: Ted van Riel <[email protected]>
1 parent 947c1ac commit ba7cf0e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

.pre-commit-hooks.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
language: script
1616
# Supported extensions by Terraform specified in
1717
# https://github.com/hashicorp/terraform/blob/0c63fb2b097edcd5cb1a91322765a414206fbea2/internal/command/fmt.go#L30-L35
18-
files: \.(tf|tofu|tfvars|tftest\.hcl|tfmock\.hcl)$
18+
files: \.(tf|tofu|tfvars|(tftest|tofutest|tfmock|tfquery)\.hcl)$
1919
exclude: \.terraform/.*$
2020

2121
- id: terraform_docs

0 commit comments

Comments
 (0)