Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ supported hooks are:
* **terraform-fmt**: Automatically run `terraform fmt` on all Terraform code (`*.tf` files).
* **terraform-validate**: Automatically run `terraform validate` on all Terraform code (`*.tf` files).
* **packer-validate**: Automatically run `packer validate` on all Packer code (`*.pkr.*` files).
* **terragrunt-hclfmt**: Automatically run `terragrunt hclfmt` on all Terragrunt configurations.
* **terragrunt-hclfmt**: Automatically run `terragrunt hcl format` on all Terragrunt configurations.
* **tflint**: Automatically run [`tflint`](https://github.com/terraform-linters/tflint) on all OpenTofu/Terraform code (`*.tf`, `*.tofu` files).
* **shellcheck**: Run [`shellcheck`](https://www.shellcheck.net/) to lint files that contain a bash [shebang](https://en.wikipedia.org/wiki/Shebang_(Unix)).
* **gofmt**: Automatically run `gofmt` on all Golang code (`*.go` files).
Expand Down
2 changes: 1 addition & 1 deletion hooks/terragrunt-hclfmt.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ export PATH=$PATH:/usr/local/bin

for file in "$@"; do
pushd "$(dirname "$file")" >/dev/null
terragrunt hclfmt --file "$(basename "$file")"
terragrunt hcl format --file "$(basename "$file")"
popd >/dev/null
done