Use go vet instead of go tool vet, and actually run it with make
This commit is contained in:
parent
5b8e4dc5b4
commit
e73ec1f70d
8
Makefile
8
Makefile
|
@ -1,8 +1,6 @@
|
||||||
TEST?=./...
|
TEST?=./...
|
||||||
VETARGS?=-asmdecl -atomic -bool -buildtags -copylocks -methods \
|
|
||||||
-nilfunc -printf -rangeloops -shift -structtags -unsafeptr
|
|
||||||
|
|
||||||
default: test
|
default: test vet dev
|
||||||
|
|
||||||
bin:
|
bin:
|
||||||
@sh -c "$(CURDIR)/scripts/build.sh"
|
@sh -c "$(CURDIR)/scripts/build.sh"
|
||||||
|
@ -41,10 +39,10 @@ updatedeps:
|
||||||
| xargs go get -f -u -v
|
| xargs go get -f -u -v
|
||||||
|
|
||||||
vet:
|
vet:
|
||||||
@go tool vet 2>/dev/null ; if [ $$? -eq 3 ]; then \
|
@go vet 2>/dev/null ; if [ $$? -eq 3 ]; then \
|
||||||
go get golang.org/x/tools/cmd/vet; \
|
go get golang.org/x/tools/cmd/vet; \
|
||||||
fi
|
fi
|
||||||
@go tool vet $(VETARGS) . ; if [ $$? -eq 1 ]; then \
|
@go vet ./... ; if [ $$? -eq 1 ]; then \
|
||||||
echo ""; \
|
echo ""; \
|
||||||
echo "Vet found suspicious constructs. Please check the reported constructs"; \
|
echo "Vet found suspicious constructs. Please check the reported constructs"; \
|
||||||
echo "and fix them if necessary before submitting the code for reviewal."; \
|
echo "and fix them if necessary before submitting the code for reviewal."; \
|
||||||
|
|
Loading…
Reference in New Issue