Golangci-lint: `go get` fails to install

Created on 17 Sep 2020  路  3Comments  路  Source: golangci/golangci-lint

Thank you for creating the issue!

  • [ ] Yes, I'm using a binary release within 2 latest major releases. Only such installations are supported.
  • [x] Yes, I've searched similar issues on GitHub and didn't find any.
  • [x] Yes, I've included all information below (version, config, etc).

Please include the following information:

Version of golangci-lint

$ golangci-lint --version
# N/A

Config file

$ cat .golangci.yml
# N/A

Go environment

$ go version && go env
# paste output here
go version go1.13.8 linux/amd64

GO111MODULE=""
GOARCH="amd64"
GOBIN=""
GOCACHE="/home/meghan/.cache/go-build"
GOENV="/home/meghan/.config/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GONOPROXY=""
GONOSUMDB=""
GOOS="linux"
GOPATH="/home/sappho/go"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/usr/lib/go-1.13"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/lib/go-1.13/pkg/tool/linux_amd64"
GCCGO="gccgo"
AR="ar"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD=""
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build991633947=/tmp/go-build -gno-record-gcc-switches"

Verbose output of running

$ golangci-lint cache clean
$ golangci-lint run -v
# N/A

Command Run

go get -v github.com/golangci/golangci-lint/cmd/golangci-lint

Output

# github.com/golangci/golangci-lint/pkg/golinters
go/src/github.com/golangci/golangci-lint/pkg/golinters/gci.go:50:25: assignment mismatch: 3 variables but gci.Run returns 2 values
go/src/github.com/golangci/golangci-lint/pkg/golinters/golint.go:21:14: l.LintPkg undefined (type *"github.com/golangci/lint-1".Linter has no field or method LintPkg)
go/src/github.com/golangci/golangci-lint/pkg/golinters/gomnd.go:13:6: cannot use magic_numbers.Analyzer (type *"github.com/tommy-muehle/go-mnd/vendor/golang.org/x/tools/go/analysis".Analyzer) as type *"golang.org/x/tools/go/analysis".Analyzer in array or slice literal
go/src/github.com/golangci/golangci-lint/pkg/golinters/unused.go:16:7: undefined: unused.NewChecker
bug

Most helpful comment

Just piping in to say I was able to get it working (Go 1.14) by using:
GO111MODULE=on go get -v github.com/golangci/golangci-lint/cmd/golangci-lint

All 3 comments

Hey, thank you for opening your first Issue ! 馃檪 If you would like to contribute we have a guide for contributors.

Just piping in to say I was able to get it working (Go 1.14) by using:
GO111MODULE=on go get -v github.com/golangci/golangci-lint/cmd/golangci-lint

Thanks!

Was this page helpful?
0 / 5 - 0 ratings