]> source.dussan.org Git - gitea.git/commitdiff
add gitea-fmt back (#18526)
author6543 <6543@obermui.de>
Tue, 1 Feb 2022 17:43:09 +0000 (18:43 +0100)
committerGitHub <noreply@github.com>
Tue, 1 Feb 2022 17:43:09 +0000 (12:43 -0500)
Makefile
modules/queue/queue_channel_test.go

index 87613d9510db396805172359593c4cc0e0351216..3c4a991fd2da1fd14cca4def5d0c524dbaf0aa02 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -231,10 +231,13 @@ clean:
 
 .PHONY: fmt
 fmt:
-       @hash xgogofumpt > /dev/null 2>&1; if [ $$? -ne 0 ]; then \
+       @echo "Running gitea-fmt(with gofmt)..."
+       @$(GO) run build/code-batch-process.go gitea-fmt -s -w '{file-list}'
+       @echo "Running gofumpt"
+       @hash gofumpt > /dev/null 2>&1; if [ $$? -ne 0 ]; then \
                $(GO) install mvdan.cc/gofumpt@latest; \
        fi
-       gofumpt -w -l -extra -lang 1.16 .
+       @gofumpt -w -l -extra -lang 1.16 .
 
 .PHONY: vet
 vet:
index f779ed5f8a1171bd32494629a7d2ece37cb90807..26a635b91897e3b861f7b4adbaac3546106f960e 100644 (file)
@@ -10,6 +10,7 @@ import (
        "time"
 
        "code.gitea.io/gitea/modules/log"
+
        "github.com/stretchr/testify/assert"
 )