Makefile: add lint target
This commit adds target for running golangci-lint. Currently, as we have
many issues with the code, use --new-from-rev, so only new commits will
be linted, which should prevent adding more warnings.
If we deal with remaining warnings in the future, this option should be
removed.
@@ -48,6 +48,10 @@ build-slim:
.PHONY: test
test: check-go-format run-unit-tests
+.PHONY: lint
+lint:
+ golangci-lint run --enable-all --max-same-issues=0 --max-issues-per-linter=0 --build-tags aws,packet,e2e --new-from-rev=$$(git merge-base master HEAD) ./...
+
GOFORMAT_FILES := $(shell find . -name '*.go' | grep -v '^./vendor')
.PHONY: check-go-format
