From e5de3adbe8c5603878737df0510b0b0a90abadb8 Mon Sep 17 00:00:00 2001 From: Eran Raichstein Date: Fri, 25 Mar 2022 19:06:24 +0300 Subject: [PATCH] add fast flag to lint --- Makefile | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 9cdf999ca..48ea691f7 100644 --- a/Makefile +++ b/Makefile @@ -66,7 +66,11 @@ validate_go: .PHONY: validate_go lint lint: $(GOLANGCI_LINT) ## Lint the code @go mod vendor - @$(GOLANGCI_LINT) run --enable goimports --timeout 5m + @current_ver=$$(go version | { read _ _ v _; echo $${v#go}; }); \ + if [[ "$$current_ver" == *"1.18."* ]]; then echo "Linting is not fully supported for golang 1.18. Consider using golang 1.17";\ + $(GOLANGCI_LINT) run --disable-all --enable goimports --enable gofmt --enable ineffassign --timeout 5m; else \ + $(GOLANGCI_LINT) run --enable goimports --timeout 5m; \ + fi .PHONY: build_code build_code: validate_go lint