Merge pull request #6849 from afbjorklund/golangci-docker
Allow running lint (golangci-lint) using dockerpull/6867/head
commit
cc1b515a5d
6
Makefile
6
Makefile
|
@ -364,8 +364,14 @@ out/linters/golangci-lint-$(GOLINT_VERSION):
|
|||
|
||||
# this one is meant for local use
|
||||
.PHONY: lint
|
||||
ifeq ($(MINIKUBE_BUILD_IN_DOCKER),y)
|
||||
lint: pkg/minikube/assets/assets.go pkg/minikube/translate/translations.go
|
||||
docker run --rm -v $(pwd):/app -w /app golangci/golangci-lint:$(GOLINT_VERSION) \
|
||||
golangci-lint run ${GOLINT_OPTIONS} --skip-dirs "cmd/drivers/kvm|cmd/drivers/hyperkit|pkg/drivers/kvm|pkg/drivers/hyperkit" ./...
|
||||
else
|
||||
lint: pkg/minikube/assets/assets.go pkg/minikube/translate/translations.go out/linters/golangci-lint-$(GOLINT_VERSION) ## Run lint
|
||||
./out/linters/golangci-lint-$(GOLINT_VERSION) run ${GOLINT_OPTIONS} ./...
|
||||
endif
|
||||
|
||||
# lint-ci is slower version of lint and is meant to be used in ci (travis) to avoid out of memory leaks.
|
||||
.PHONY: lint-ci
|
||||
|
|
Loading…
Reference in New Issue