mirror of
https://github.com/appleboy/drone-ssh.git
synced 2025-05-09 18:23:21 +08:00
chore(makefile): change gofmt toll to gofumpt
This commit is contained in:
parent
5750d46265
commit
6850ed1bff
8
Makefile
8
Makefile
@ -1,6 +1,6 @@
|
||||
DIST := dist
|
||||
EXECUTABLE := drone-ssh
|
||||
GOFMT ?= gofmt "-s"
|
||||
GOFMT ?= gofumpt -l -s
|
||||
GO ?= go
|
||||
|
||||
# for dockerhub
|
||||
@ -28,6 +28,9 @@ endif
|
||||
all: build
|
||||
|
||||
fmt:
|
||||
@hash gofumpt > /dev/null 2>&1; if [ $$? -ne 0 ]; then \
|
||||
$(GO) get -u mvdan.cc/gofumpt; \
|
||||
fi
|
||||
$(GOFMT) -w $(SOURCES)
|
||||
|
||||
vet:
|
||||
@ -55,6 +58,9 @@ misspell:
|
||||
|
||||
.PHONY: fmt-check
|
||||
fmt-check:
|
||||
@hash gofumpt > /dev/null 2>&1; if [ $$? -ne 0 ]; then \
|
||||
$(GO) get -u mvdan.cc/gofumpt; \
|
||||
fi
|
||||
@diff=$$($(GOFMT) -d $(SOURCES)); \
|
||||
if [ -n "$$diff" ]; then \
|
||||
echo "Please run 'make fmt' and commit the result:"; \
|
||||
|
@ -387,9 +387,7 @@ func TestCommandOutput(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestWrongFingerprint(t *testing.T) {
|
||||
var (
|
||||
buffer bytes.Buffer
|
||||
)
|
||||
var buffer bytes.Buffer
|
||||
|
||||
plugin := Plugin{
|
||||
Config: Config{
|
||||
|
Loading…
Reference in New Issue
Block a user