From 57b9d9b6ca435c58cb6b7a29abfdfe5b22e69eb1 Mon Sep 17 00:00:00 2001 From: Nicolas De Loof Date: Tue, 17 Dec 2024 12:16:33 +0100 Subject: [PATCH] CI to validate fmt Signed-off-by: Nicolas De Loof --- .github/workflows/ci.yml | 1 + Makefile | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d66fbea0b7b..0a8e62ec676 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -50,6 +50,7 @@ jobs: - validate-go-mod - validate-headers - validate-docs + - validate-fmt steps: - name: Checkout diff --git a/Makefile b/Makefile index 946947d0e0c..f2284d896b2 100644 --- a/Makefile +++ b/Makefile @@ -121,6 +121,10 @@ fmt: gofumpt --version >/dev/null 2>&1 || go install mvdan.cc/gofumpt@latest gofumpt -w . +.PHONY: validate-fmt +validate-fmt: fmt + $(shell test -z "$$(git status --porcelain)" ) + .PHONY: docs docs: ## generate documentation $(eval $@_TMP_OUT := $(shell mktemp -d -t compose-output.XXXXXXXXXX))