mirror of
https://github.com/go-gitea/gitea.git
synced 2026-08-25 12:59:45 +09:00
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:
@@ -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}"; \
|
||||
|
||||
Reference in New Issue
Block a user