From e879899d906c2bec9545be9c418931d5c94a32ed Mon Sep 17 00:00:00 2001 From: "juvenal.diaz" Date: Mon, 9 Nov 2026 19:25:23 -0600 Subject: [PATCH] Fix Go formatting and report validation failures --- cmd/jeannie-server/main.go | 2 +- scripts/validate-homelab | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/cmd/jeannie-server/main.go b/cmd/jeannie-server/main.go index fdef4b8..9c4017a 100644 --- a/cmd/jeannie-server/main.go +++ b/cmd/jeannie-server/main.go @@ -57,7 +57,7 @@ var allowedCommands = map[string]bool{ "deploy-ai-tools": true, "deploy-omniroute": true, "deploy-hermes": true, "rpi-services": true, "host-bootstrap": true, "bootstrap-gitea-repo": true, "repo-sync": true, "backup-gitea": true, "hermes-connect": true, "network-sandbox": true, - "backup": true, "drill-restore": true, "drill-gitea-restore": true, + "backup": true, "drill-restore": true, "drill-gitea-restore": true, "drill-pihole-restore": true, "install-gitea-runner": true, "move-prometheus-stack-workers": true, "doctor-versions": true, "doctor-edge": true, "doctor-homelab": true, "doctor-gitea": true, diff --git a/scripts/validate-homelab b/scripts/validate-homelab index 17a0cac..d8471af 100755 --- a/scripts/validate-homelab +++ b/scripts/validate-homelab @@ -85,7 +85,12 @@ validate_go() { echo "go not installed; skipping Go checks" return 0 fi - test -z "$(gofmt -l "${REPO_ROOT}/cmd")" + local unformatted + unformatted="$(gofmt -l "${REPO_ROOT}/cmd")" + if [[ -n "${unformatted}" ]]; then + printf 'Go files require formatting:\n%s\n' "${unformatted}" >&2 + return 1 + fi GOCACHE="${GOCACHE:-${REPO_ROOT}/.lab/go-build-cache}" go test ./... }