Set BINARY variable for golangci-lint.sh (#1493)
* Set BINARY variable for golangci-lint.sh * Set higher deadline for linter
This commit is contained in:
parent
5c61b9f5ea
commit
804a109b26
5
Makefile
5
Makefile
|
@ -6,6 +6,7 @@ RELEASE_BRANCH := develop
|
||||||
RELEASE_DIR := /tmp/release-$(RELEASE_TAG)
|
RELEASE_DIR := /tmp/release-$(RELEASE_TAG)
|
||||||
PRE_RELEASE := "1"
|
PRE_RELEASE := "1"
|
||||||
RELEASE_TYPE := $(shell if [ $(PRE_RELEASE) = "0" ] ; then echo release; else echo pre-release ; fi)
|
RELEASE_TYPE := $(shell if [ $(PRE_RELEASE) = "0" ] ; then echo release; else echo pre-release ; fi)
|
||||||
|
GOLANGCI_BINARY=golangci-lint
|
||||||
|
|
||||||
help: ##@other Show this help
|
help: ##@other Show this help
|
||||||
@perl -e '$(HELP_FUN)' $(MAKEFILE_LIST)
|
@perl -e '$(HELP_FUN)' $(MAKEFILE_LIST)
|
||||||
|
@ -269,11 +270,11 @@ canary-test: node-canary
|
||||||
|
|
||||||
lint-install:
|
lint-install:
|
||||||
@# The following installs a specific version of golangci-lint, which is appropriate for a CI server to avoid different results from build to build
|
@# The following installs a specific version of golangci-lint, which is appropriate for a CI server to avoid different results from build to build
|
||||||
curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | bash -s -- -b $(GOPATH)/bin v1.17.1
|
curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | BINARY=$(GOLANGCI_BINARY) bash -s -- -d -b $(GOPATH)/bin v1.17.1
|
||||||
|
|
||||||
lint:
|
lint:
|
||||||
@echo "lint"
|
@echo "lint"
|
||||||
@golangci-lint run ./...
|
@golangci-lint run ./... --deadline=5m
|
||||||
|
|
||||||
ci: lint canary-test test-unit test-e2e ##@tests Run all linters and tests at once
|
ci: lint canary-test test-unit test-e2e ##@tests Run all linters and tests at once
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue