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
|
DIST := dist
|
||||||
EXECUTABLE := drone-ssh
|
EXECUTABLE := drone-ssh
|
||||||
GOFMT ?= gofmt "-s"
|
GOFMT ?= gofumpt -l -s
|
||||||
GO ?= go
|
GO ?= go
|
||||||
|
|
||||||
# for dockerhub
|
# for dockerhub
|
||||||
@ -28,6 +28,9 @@ endif
|
|||||||
all: build
|
all: build
|
||||||
|
|
||||||
fmt:
|
fmt:
|
||||||
|
@hash gofumpt > /dev/null 2>&1; if [ $$? -ne 0 ]; then \
|
||||||
|
$(GO) get -u mvdan.cc/gofumpt; \
|
||||||
|
fi
|
||||||
$(GOFMT) -w $(SOURCES)
|
$(GOFMT) -w $(SOURCES)
|
||||||
|
|
||||||
vet:
|
vet:
|
||||||
@ -55,6 +58,9 @@ misspell:
|
|||||||
|
|
||||||
.PHONY: fmt-check
|
.PHONY: fmt-check
|
||||||
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)); \
|
@diff=$$($(GOFMT) -d $(SOURCES)); \
|
||||||
if [ -n "$$diff" ]; then \
|
if [ -n "$$diff" ]; then \
|
||||||
echo "Please run 'make fmt' and commit the result:"; \
|
echo "Please run 'make fmt' and commit the result:"; \
|
||||||
|
@ -387,9 +387,7 @@ func TestCommandOutput(t *testing.T) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func TestWrongFingerprint(t *testing.T) {
|
func TestWrongFingerprint(t *testing.T) {
|
||||||
var (
|
var buffer bytes.Buffer
|
||||||
buffer bytes.Buffer
|
|
||||||
)
|
|
||||||
|
|
||||||
plugin := Plugin{
|
plugin := Plugin{
|
||||||
Config: Config{
|
Config: Config{
|
||||||
|
Loading…
Reference in New Issue
Block a user