GOLINTER ?= golangci-lint
GOLINTER_VERSION ?= v1.56.2
lint: ## Lint, will not fix but sets exit code on error
@which $(GOLINTER) > /dev/null || (echo "Installing $(GOLINTER)@$(GOLINTER_VERSION) ..."; go install github.com/golangci/golangci-lint/cmd/golangci-lint@$(GOLINTER_VERSION) && echo -e "Installation complete!\n")
$(GOLINTER) run --deadline=10m $(SOURCE_PATHS)
lint-fix: ## Lint, will try to fix errors and modify code
@which $(GOLINTER) > /dev/null || (echo "Installing $(GOLINTER)@$(GOLINTER_VERSION) ..."; go install github.com/golangci/golangci-lint/cmd/golangci-lint@$(GOLINTER_VERSION) && echo -e "Installation complete!\n")
$(GOLINTER) run --deadline=10m $(SOURCE_PATHS) --fix
.PHONY: test cover cover-html format lint lint-fix doc build-changelog upload clean build-all build-image build-local-linux build-local-windows build-local-linux-all build-local-windows-all e2e-test gen-api-spec gen-api-doc build-portal show-portal-status
in the Makefile, linter used is golangci-lint v1.56.2. Command line says
$(GOLINTER) run --deadline=10m
--deadline has been deprecated in favor of --timeout
golangci-lint run --help | grep -E 'timeout|deadline'
--timeout duration Timeout for total work (default 1m0s)
in the
Makefile, linter used isgolangci-lint v1.56.2. Command line says--deadlinehas been deprecated in favor of--timeout