diff --git a/Makefile b/Makefile index a2807b11d8..349abe8b48 100644 --- a/Makefile +++ b/Makefile @@ -48,6 +48,7 @@ lint_terraform: dev $(eval export TF_VAR_system_dns_zone_name=$SYSTEM_DNS_ZONE_NAME) $(eval export TF_VAR_apps_dns_zone_name=$APPS_DNS_ZONE_NAME) find terraform -mindepth 1 -maxdepth 1 -type d -not -path 'terraform/providers' -not -path 'terraform/scripts' -print0 | xargs -0 -n 1 -t terraform graph > /dev/null + @if [ "$$(terraform fmt -write=false terraform)" != "" ] ; then echo "Use 'terraform fmt' to fix HCL formatting:"; terraform fmt -write=false -diff=true terraform ; exit 1; fi lint_shellcheck: find . -name '*.sh' -not -path '*/vendor/*' | xargs $(SHELLCHECK)