Skip to content
This repository was archived by the owner on Mar 9, 2022. It is now read-only.

Commit c04aabc

Browse files
committed
Fix golangci-lint installation
The makefile was using "go get" as a replacement for "git clone", whith would try to fetch some dependencies that are not in the version we're installing, go get -d github.com/golangci/golangci-lint/cmd/golangci-lint Causing the build to fail; package 4d63.com/gochecknoglobals/checknoglobals: unrecognized import path "4d63.com/gochecknoglobals/checknoglobals": reading https://4d63.com/gochecknoglobals/checknoglobals?go-get=1: 404 Not Found Switching to use git clone to prevent golang attempting to download dependencies, as the version we're currently installing uses vendoring, and disabling go modules when building (otherwise go 1.13 would still fetch go modules) This could be changed to using go modules, and use `go get golangci-lint@VERSION`, but this needs to be done in a directory outside of GOPATH, so keeping that for a follow-up. Signed-off-by: Sebastiaan van Stijn <[email protected]>
1 parent 9528e30 commit c04aabc

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -170,10 +170,10 @@ install.tools: .install.gitvalidation .install.golangci-lint .install.vndr ## in
170170

171171
.install.golangci-lint:
172172
@echo "$(WHALE) $@"
173-
$(GO) get -d github.com/golangci/golangci-lint/cmd/golangci-lint
173+
git clone https://github.com/golangci/golangci-lint.git $(GOPATH)/src/github.com/golangci/golangci-lint
174174
@cd $(GOPATH)/src/github.com/golangci/golangci-lint/cmd/golangci-lint; \
175175
git checkout v1.18.0; \
176-
go install
176+
GO111MODULE=off go install
177177

178178
.install.vndr:
179179
@echo "$(WHALE) $@"

0 commit comments

Comments
 (0)