gruntwork-io / gruntwork-io/pre-commit

terraform-fmt hook behaviour change

Open
#48 11 comments 22 reactions 0 assignees View on GitHub
enhancement
Dominant language
Shell
Stars
547
Forks
168
PR merge metrics
No merged PRs in 30d

Description

Previously the terraform-fmt hook made changes to the files, whereas now it only shows the difference and errors out. I did some digging and found that it was an intentional change as part of this PR: https://github.com/gruntwork-io/pre-commit/pull/46

It would be nice to have the old behaviour as an option. Generally my terraform files are syntactically valid, but incorrectly formatted, the previous behaviour took away the pain point of needing to run `terraform fmt` after every change. The differences don't need to be analysed, so there's no need for the `--diff --check`.

Thanks for providing these hooks, they've been super useful!

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.