Skip to content

Commit

Permalink
lint: downgrade golangci-lint to 1.23.8
Browse files Browse the repository at this point in the history
1.24.0 causing out-of-memory see [1]
so for now pin the version to 1.23.8

[1] - golangci/golangci-lint#994
  • Loading branch information
moshe010 committed Mar 16, 2020
1 parent 2d1b99e commit c26bb31
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@ IMAGE_BUILD_OPTS += $(DOCKERARGS)

# Go tools
GO = go
GOLINT = $(GOBIN)/golangci-lint
GOLANGCI_LINT_VERSION = v1.23.8
GOLANGCI_LINT = $(GOBIN)/golangci-lint
TIMEOUT = 15
V = 0
Q = $(if $(filter 1,$V),,@)
Expand Down Expand Up @@ -65,8 +66,8 @@ $(BUILDDIR)/$(BINARY_NAME): $(GOFILES) | $(BUILDDIR)

# Tools

$(GOLINT): | $(BASE) ; $(info building golangci-lint...)
$Q go get -u github.com/golangci/golangci-lint/cmd/golangci-lint
$(GOLANGCI_LINT): | $(BASE) ; $(info building golangci-lint...)
$Q curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s -- -b $(GOBIN) $(GOLANGCI_LINT_VERSION)

This comment has been minimized.

Copy link
@adrianchiris

adrianchiris Mar 17, 2020

you could just : go get github.com/golangci/golangci-lint/cmd/golangci-lint@v1.23.8

i removed the -u since -u updates the dependencies of the project to the latest instead of taking what the project required.
more info in go help get command

This comment has been minimized.

Copy link
@moshe010

moshe010 Mar 17, 2020

Author Owner

yes so it didn't work because in my env go v1.11


GOVERALLS = $(GOBIN)/goveralls
$(GOBIN)/goveralls: | $(BASE) ; $(info building goveralls...)
Expand All @@ -75,9 +76,9 @@ $(GOBIN)/goveralls: | $(BASE) ; $(info building goveralls...)
# Tests

.PHONY: lint
lint: | $(BASE) $(GOLINT) ; $(info running golangci-lint...) @ ## Run golangci-lint
lint: | $(BASE) $(GOLANGCI_LINT) ; $(info running golangci-lint...) @ ## Run golangci-lint
$Q cd $(BASE) && ret=0 && \
test -z "$$($(GOLINT) run --timeout 10m0s | tee /dev/stderr)" || ret=1 ; \
test -z "$$($(GOLANGCI_LINT) run --timeout 10m0s | tee /dev/stderr)" || ret=1 ; \
exit $$ret

plugins: noop-plugin ufm-plugin ; $(info Building plugins...) ## Build plugins
Expand Down

0 comments on commit c26bb31

Please sign in to comment.