mirror of
https://github.com/kemko/nomad.git
synced 2026-01-04 01:15:43 +03:00
Fixed the go vet to skip vendored files
This commit is contained in:
@@ -9,6 +9,8 @@ EXTERNAL_TOOLS=\
|
||||
github.com/axw/gocov/gocov \
|
||||
gopkg.in/matm/v1/gocov-html
|
||||
|
||||
GOFILES_NOVENDOR = $(shell find . -type f -name '*.go' -not -path "./vendor/*")
|
||||
|
||||
all: test
|
||||
|
||||
dev: format
|
||||
@@ -39,14 +41,14 @@ vet:
|
||||
@go tool vet 2>/dev/null ; if [ $$? -eq 3 ]; then \
|
||||
go get golang.org/x/tools/cmd/vet; \
|
||||
fi
|
||||
@echo "--> Running go tool vet $(VETARGS) ."
|
||||
@go tool vet $(VETARGS) . ; if [ $$? -eq 1 ]; then \
|
||||
@echo "--> Running go tool vet $(VETARGS) ${GOFILES_NOVENDOR}"
|
||||
@go tool vet $(VETARGS) ${GOFILES_NOVENDOR} ; if [ $$? -eq 1 ]; then \
|
||||
echo ""; \
|
||||
echo "[LINT] Vet found suspicious constructs. Please check the reported constructs"; \
|
||||
echo "and fix them if necessary before submitting the code for review."; \
|
||||
fi
|
||||
|
||||
@git grep -n `echo "log"".Print"` ; if [ $$? -eq 0 ]; then \
|
||||
@git grep -n `echo "log"".Print"` | grep -v 'vendor/' ; if [ $$? -eq 0 ]; then \
|
||||
echo "[LINT] Found "log"".Printf" calls. These should use Nomad's logger instead."; \
|
||||
fi
|
||||
|
||||
|
||||
Reference in New Issue
Block a user