Merge pull request #4557 from afbjorklund/golint
Add golint and gocyclo smaller make targetspull/4573/head
commit
c7ea856d2a
17
Makefile
17
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)
|
||||
|
@ -217,12 +217,25 @@ gendocs: out/docs/minikube.md
|
|||
|
||||
.PHONY: fmt
|
||||
fmt:
|
||||
@gofmt -l -s -w $(SOURCE_DIRS)
|
||||
@gofmt -s -w $(SOURCE_DIRS)
|
||||
|
||||
.PHONY: gofmt
|
||||
gofmt:
|
||||
@gofmt -s -l $(SOURCE_DIRS)
|
||||
@test -z "`gofmt -s -l $(SOURCE_DIRS)`"
|
||||
|
||||
.PHONY: vet
|
||||
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