diff --git a/scripts/check.sh b/scripts/check.sh index a80d81f..97b16ab 100755 --- a/scripts/check.sh +++ b/scripts/check.sh @@ -26,11 +26,12 @@ go vet ./... echo "[check] running go test" go test ./... -if command -v terraform >/dev/null 2>&1; then - echo "[check] running terraform fmt check for examples/" - terraform fmt -check -recursive examples -else - echo "[check][warn] terraform not found; skipping examples/ checks" >&2 +if ! command -v terraform >/dev/null 2>&1; then + echo "[check][error] terraform not found in PATH" >&2 + exit 1 fi +echo "[check] running terraform fmt check for examples/" +terraform fmt -check -recursive examples + echo "[check] complete" diff --git a/scripts/fix.sh b/scripts/fix.sh index 9e12dfb..3f9bc0d 100755 --- a/scripts/fix.sh +++ b/scripts/fix.sh @@ -18,11 +18,12 @@ fi echo "[fix] running go mod tidy" go mod tidy -if command -v terraform >/dev/null 2>&1; then - echo "[fix] running terraform fmt for examples/" - terraform fmt -recursive examples -else - echo "[fix][warn] terraform not found; skipping examples/ formatting" >&2 +if ! command -v terraform >/dev/null 2>&1; then + echo "[fix][error] terraform not found in PATH" >&2 + exit 1 fi +echo "[fix] running terraform fmt for examples/" +terraform fmt -recursive examples + echo "[fix] complete" diff --git a/scripts/setup-dev.sh b/scripts/setup-dev.sh index c354916..cce94d1 100755 --- a/scripts/setup-dev.sh +++ b/scripts/setup-dev.sh @@ -5,7 +5,7 @@ MIN_GO_VERSION="1.23.0" MIN_TERRAFORM_VERSION="1.5.0" FIX_MODE=0 -STRICT_MODE=0 +STRICT_MODE=1 log() { echo "[setup-dev] $*" @@ -21,11 +21,11 @@ error() { usage() { cat <