diff --git a/Makefile b/Makefile index 3f3c40a3000..be2839d8fbb 100644 --- a/Makefile +++ b/Makefile @@ -170,6 +170,10 @@ $(BIN)/golangci-lint: ; $(info $(M) getting golangci-lint $(GOLANGCI_VERSION)) golangci-lint: | $(GOLANGCILINT) ; $(info $(M) running golangci-lint…) @ ## Run golangci-lint $Q $(GOLANGCILINT) run --modules-download-mode=vendor --max-issues-per-linter=0 --max-same-issues=0 --deadline 5m +.PHONY: golangci-lint-check +golangci-lint-check: | $(GOLANGCILINT) ; $(info $(M) Testing if golint has been done…) @ ## Run golangci-lint for build tests CI job + $Q $(GOLANGCILINT) run -j 1 --color=never + GOIMPORTS = $(BIN)/goimports $(BIN)/goimports: PACKAGE=golang.org/x/tools/cmd/goimports diff --git a/test/presubmit-tests.sh b/test/presubmit-tests.sh index 6a8c81ca144..9369dd57cb3 100755 --- a/test/presubmit-tests.sh +++ b/test/presubmit-tests.sh @@ -33,7 +33,7 @@ function check_go_lint() { header "Testing if golint has been done" # deadline of 5m, and show all the issues - golangci-lint -j 1 --color=never run + GOFLAGS="-mod=mod" make golangci-lint-check if [[ $? != 0 ]]; then results_banner "Go Lint" 1