Skip to content

Commit f8760a4

Browse files
author
Andrew Babichev
committed
Use terraform fmt -recursive
1 parent d2082c7 commit f8760a4

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

.pre-commit-hooks.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
language: script
88
files: \.tf$
99
exclude: \.+.terraform\/.*$
10+
require_serial: true
1011

1112
- id: terraform-validate
1213
name: Terraform validate

hooks/terraform-fmt.sh

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,4 @@ set -e
77
# workaround to allow GitHub Desktop to work, add this (hopefully harmless) setting here.
88
export PATH=$PATH:/usr/local/bin
99

10-
for file in "$@"; do
11-
terraform fmt `dirname $file`
12-
done
10+
terraform fmt -recursive

0 commit comments

Comments
 (0)