Add golint and gocyclo smaller make targets
Also fix the broken fmt and reportcard ones: Recursive variable 'SOURCE_DIRS' references itself (eventually).pull/4557/head
parent
247efdea15
commit
cc0a1298d9
10
Makefile
10
Makefile
|
@ -76,7 +76,7 @@ MINIKUBE_BUILD_TAGS := container_image_ostree_stub containers_image_openpgp
|
|||
MINIKUBE_INTEGRATION_BUILD_TAGS := integration $(MINIKUBE_BUILD_TAGS)
|
||||
|
||||
CMD_SOURCE_DIRS = cmd pkg
|
||||
SOURCE_DIRS = $(SOURCE_DIRS) test
|
||||
SOURCE_DIRS = $(CMD_SOURCE_DIRS) test
|
||||
SOURCE_PACKAGES = ./cmd/... ./pkg/... ./test/...
|
||||
|
||||
# $(call DOCKER, image, command)
|
||||
|
@ -223,6 +223,14 @@ fmt:
|
|||
vet:
|
||||
@go vet $(SOURCE_PACKAGES)
|
||||
|
||||
.PHONY: golint
|
||||
golint:
|
||||
@golint -set_exit_status $(SOURCE_PACKAGES)
|
||||
|
||||
.PHONY: gocyclo
|
||||
gocyclo:
|
||||
@gocyclo -over 15 `find $(SOURCE_DIRS) -type f -name "*.go"`
|
||||
|
||||
out/linters/golangci-lint:
|
||||
mkdir -p out/linters
|
||||
curl -sfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b out/linters $(GOLINT_VERSION)
|
||||
|
|
Loading…
Reference in New Issue