commit
ef1f2d5e71
16
Makefile
16
Makefile
|
@ -1,4 +1,5 @@
|
|||
TEST?=./...
|
||||
VETARGS?=-asmdecl -atomic -bool -buildtags -copylocks -methods -nilfunc -printf -rangeloops -shift -structtags -unsafeptr
|
||||
|
||||
default: test
|
||||
|
||||
|
@ -10,6 +11,7 @@ dev: generate
|
|||
|
||||
test: generate
|
||||
TF_ACC= go test $(TEST) $(TESTARGS) -timeout=10s -parallel=4
|
||||
@$(MAKE) vet
|
||||
|
||||
testacc: generate
|
||||
@if [ "$(TEST)" = "./..." ]; then \
|
||||
|
@ -26,10 +28,22 @@ updatedeps:
|
|||
git symbolic-ref --short HEAD 2>/dev/null \
|
||||
|| git rev-parse HEAD"))
|
||||
go get -u golang.org/x/tools/cmd/stringer
|
||||
go get -u golang.org/x/tools/cmd/vet
|
||||
go get -f -u -v ./...
|
||||
git checkout $(REF)
|
||||
|
||||
vet:
|
||||
@go tool vet 2>/dev/null ; if [ $$? -eq 3 ]; then \
|
||||
go get golang.org/x/tools/cmd/vet; \
|
||||
fi
|
||||
@echo "go tool vet $(VETARGS) ."
|
||||
@go tool vet $(VETARGS) . ; if [ $$? -eq 1 ]; then \
|
||||
echo ""; \
|
||||
echo "Vet found suspicious constructs. Please check the reported constructs"; \
|
||||
echo "and fix them if necessary before submitting the code for reviewal."; \
|
||||
fi
|
||||
|
||||
generate:
|
||||
go generate ./...
|
||||
|
||||
.PHONY: bin default generate test updatedeps
|
||||
.PHONY: bin default generate test updatedeps vet
|
||||
|
|
Loading…
Reference in New Issue