Skip to content

Commit 5b924d9

Browse files
committed
Fix 'make fmt-check'
`make fmt-check` did not run all commands that `make fmt` did, resulting in missed diffs. Fix that by just depending on the `fmt` target. Includes: #18633
1 parent 3b33507 commit 5b924d9

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

Makefile

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -284,9 +284,8 @@ errcheck:
284284
@errcheck $(GO_PACKAGES)
285285

286286
.PHONY: fmt-check
287-
fmt-check:
288-
# get all go files and run gitea-fmt (with gofmt) on them
289-
@diff=$$($(GO) run build/code-batch-process.go gitea-fmt -s -d '{file-list}'); \
287+
fmt-check: fmt
288+
@diff=$$(git diff $(GO_DIRS)); \
290289
if [ -n "$$diff" ]; then \
291290
echo "Please run 'make fmt' and commit the result:"; \
292291
echo "$${diff}"; \

services/mailer/mail_test.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ import (
1717
"code.gitea.io/gitea/models/unittest"
1818
user_model "code.gitea.io/gitea/models/user"
1919
"code.gitea.io/gitea/modules/setting"
20+
2021
"github.com/stretchr/testify/assert"
2122
)
2223

0 commit comments

Comments
 (0)