-
Notifications
You must be signed in to change notification settings - Fork 167
Update terraform-fmt to match terraform-validate #46
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
This PR updates the `terraform-fmt` hook as follows: 1. Extract all the directories with Terraform code first and run `terraform fmt` once per directory. 1. Print out the directory where we're running `terraform fmt` to make debugging errors much easier. 1. Instead of exiting on the first error, save the exit codes, and print out all `fmt` errors before exiting. These changes are very similar to #45.
Co-authored-by: David Alger <[email protected]>
Seems to work great! PR updated. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Thanks for the review! Merging now. |
What was the reason for adding |
I second this as well |
This PR updates the
terraform-fmt
hook as follows:-diff -check
so the differences are printed, rather than made on disk.fmt
errors before exiting.These changes are very similar to #45.