Skip to content

Commit 6580bad

Browse files
committed
Fix go vet
1 parent 3c4bf50 commit 6580bad

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Makefile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ NAME = scw
3030
SOURCES := $(shell find . -type f -name "*.go")
3131
COMMANDS := $(shell go list ./... | grep -v /vendor/ | grep /cmd/)
3232
PACKAGES := $(shell go list ./... | grep -v /vendor/ | grep -v /cmd/)
33+
REL_COMMANDS := $(subst $(GODIR),./,$(COMMANDS))
34+
REL_PACKAGES := $(subst $(GODIR),./,$(PACKAGES))
3335
VERSION = $(shell cat .goxc.json | grep "PackageVersion" | egrep -o "([0-9]{1,}\.)+[0-9]{1,}")
3436
REV = $(shell git rev-parse HEAD || git ls-remote https://github.com/scaleway/scaleway-cli | grep -F $(VERSION) | head -n1 | awk '{print $$1}' || echo "nogit")
3537
TAG = $(shell git describe --tags --always || echo $(VERSION) || echo "nogit")
@@ -73,7 +75,7 @@ fmt: $(FMT_LIST)
7375

7476
$(BUILD_LIST): %_build: %_fmt %_iref
7577
$(GOBUILD) -ldflags $(LDFLAGS) -o $(NAME) $(subst $(GODIR),./,$*)
76-
$(GO) tool vet -all=true $(PACKAGES) $(COMMANDS)
78+
for file in $(shell find $(REL_COMMANDS) $(REL_PACKAGES) -depth 1 -name "*.go"); do $(GO) tool vet -all=true $$file; done
7779
$(CLEAN_LIST): %_clean:
7880
$(GOCLEAN) $(subst $(GODIR),./,$*)
7981
$(INSTALL_LIST): %_install:

0 commit comments

Comments
 (0)