make: ensure make fmt is run with -s flag
Linting will fail if code is not formatted with the -s flag, so make sure we always use it when formatting.
This commit is contained in:
parent
68d96488cc
commit
dca5997262
3
Makefile
3
Makefile
@ -36,6 +36,7 @@ GOBUILD := go build -v
|
||||
GOINSTALL := go install -v
|
||||
GOTEST := go test -v
|
||||
|
||||
GOFILES_NOVENDOR = $(shell find . -type f -name '*.go' -not -path "./vendor/*")
|
||||
GOLIST := go list $(PKG)/... | grep -v '/vendor/'
|
||||
GOLISTCOVER := $(shell go list -f '{{.ImportPath}}' ./... | sed -e 's/^$(ESCPKG)/./')
|
||||
GOLISTLINT := $(shell go list -f '{{.Dir}}' ./... | grep -v 'lnrpc')
|
||||
@ -211,7 +212,7 @@ endif
|
||||
|
||||
fmt:
|
||||
@$(call print, "Formatting source.")
|
||||
$(GOLIST) | $(XARGS) go fmt -x
|
||||
gofmt -l -w -s $(GOFILES_NOVENDOR)
|
||||
|
||||
lint: $(LINT_BIN)
|
||||
@$(call print, "Linting source.")
|
||||
|
Loading…
Reference in New Issue
Block a user