From 928f702a87c5b172127168fc7642915e9820cee4 Mon Sep 17 00:00:00 2001 From: silverwind Date: Mon, 10 Aug 2026 10:55:48 +0200 Subject: [PATCH] chore: scope `fmt-check` to the files `make fmt` writes `make fmt` formats Go sources and templates, it never touches `web_src`, so `$(WEB_DIRS)` in the diff only makes the check fail on unrelated uncommitted frontend changes. It entered in https://github.com/go-gitea/gitea/pull/21458, where misspell briefly rewrote JS and CSS as part of `fmt`, and stayed after misspell moved back out into a check-only target. Assisted-by: Claude Code:claude-opus-5 --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 45f082e24bd..a653b42ce86 100644 --- a/Makefile +++ b/Makefile @@ -212,7 +212,7 @@ fmt: ## format the Go and template code .PHONY: fmt-check fmt-check: fmt - @diff=$$(git diff --color=always $(GO_SOURCES) templates $(WEB_DIRS)); \ + @diff=$$(git diff --color=always $(GO_SOURCES) templates); \ if [ -n "$$diff" ]; then \ echo "Please run 'make fmt' and commit the result:"; \ printf "%s" "$${diff}"; \