Switch to using Makefile for lint

This uses gobin in the Makefile for golint. Gobin allows for easier
pinning of dependencies that are project specific, as in the actual
gobin command invocation you can specify the version.
This commit is contained in:
Sargun Dhillon
2020-12-05 19:19:54 -08:00
parent c0d5809285
commit 9a60ea2494
3 changed files with 6 additions and 5 deletions

View File

@@ -192,3 +192,7 @@ envtest: kubebuilder_2.3.1_${TEST_OS}_${TEST_ARCH}
.PHONY: fmt
fmt:
goimports -w $(shell go list -f '{{.Dir}}' ./...)
.PHONY: lint
lint: $(gobin_tool)
gobin -run github.com/golangci/golangci-lint/cmd/golangci-lint@v1.33.0 run ./...