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
This commit is contained in:
silverwind
2026-08-10 10:55:48 +02:00
parent 7bfe91f9f6
commit 928f702a87
+1 -1
View File
@@ -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}"; \