Skip to content

Commit

Permalink
Merge pull request #154 from eranra/clean-go1.18
Browse files Browse the repository at this point in the history
BUILD: add fast flag to lint
  • Loading branch information
eranra committed Mar 27, 2022
2 parents 28f6256 + e5de3ad commit 6a25d4a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 6a25d4a

Please sign in to comment.