From b2c438971b2563b0407b32e35d8e3d880f2e6e45 Mon Sep 17 00:00:00 2001 From: Nicolas De Loof Date: Tue, 17 Dec 2024 10:05:37 +0100 Subject: [PATCH] `make fmt` so any contributor can enforce formatting Signed-off-by: Nicolas De Loof --- Makefile | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Makefile b/Makefile index a69fa57bf36..946947d0e0c 100644 --- a/Makefile +++ b/Makefile @@ -116,6 +116,11 @@ cache-clear: ## Clear the builder cache lint: ## run linter(s) $(BUILDX_CMD) bake lint +.PHONY: fmt +fmt: + gofumpt --version >/dev/null 2>&1 || go install mvdan.cc/gofumpt@latest + gofumpt -w . + .PHONY: docs docs: ## generate documentation $(eval $@_TMP_OUT := $(shell mktemp -d -t compose-output.XXXXXXXXXX))