gojp / goreportcard

A report card for your Go application
https://goreportcard.com
Apache License 2.0
2k stars 250 forks source link

Can not make install success #334

Closed chenyanchen closed 3 years ago

chenyanchen commented 3 years ago

What version of Go are you using (go version)?

$ go version
go version go1.15.6 darwin/amd64

What go env you are?

$ go env
GO111MODULE="on"
GOARCH="amd64"
GOBIN=""
GOCACHE="/Users/miasto/Library/Caches/go-build"
GOENV="/Users/miasto/Library/Application Support/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOINSECURE=""
GOMODCACHE="/Users/miasto/go/pkg/mod"
GONOPROXY=""
GONOSUMDB=""
GOOS="darwin"
GOPATH="/Users/miasto/go"
GOPRIVATE=""
GOPROXY="https://goproxy.cn,direct"
GOROOT="/usr/local/go"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/darwin_amd64"
GCCGO="gccgo"
AR="ar"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
GOMOD="/Users/miasto/go/src/github.com/gojp/goreportcard/go.mod"
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 -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/gl/8npwgrx17s1cw983_3lgjyqw0000gn/T/go-build109703931=/tmp/go-build -gno-record-gcc-switches -fno-common"

What did you do?

$ go get github.com/gojp/goreportcard
$ cd $GOPATH/src/github.com/gojp/goreportcard
$ make install

What did you expect to see?

no error and build successed

What did you see instead?

./scripts/make-install.sh
go: github.com/alecthomas/gometalinter upgrade => v3.0.0+incompatible
go: finding module for package gopkg.in/alecthomas/kingpin.v3-unstable
go: finding module for package github.com/google/shlex
go: found github.com/google/shlex in github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510
go: found gopkg.in/alecthomas/kingpin.v3-unstable in gopkg.in/alecthomas/kingpin.v3-unstable v3.0.0-20191105091915-95d230a53780
go: finding module for package github.com/alecthomas/units
go: finding module for package github.com/nicksnyder/go-i18n/i18n
go: found github.com/alecthomas/units in github.com/alecthomas/units v0.0.0-20201120081800-1786d5ef83d4
go: found github.com/nicksnyder/go-i18n/i18n in github.com/nicksnyder/go-i18n v1.10.1
# github.com/alecthomas/gometalinter
../../../../pkg/mod/github.com/alecthomas/gometalinter@v3.0.0+incompatible/main.go:36:94: cannot use loadConfig (type func(*kingpin.Application, *kingpin.ParseElement, *kingpin.ParseContext) error) as type kingpin.Action in argument to app.cmdMixin.flagGroup.Flag("config", "Load JSON configuration from file.").Envar("GOMETALINTER_CONFIG").Action
../../../../pkg/mod/github.com/alecthomas/gometalinter@v3.0.0+incompatible/main.go:38:100: cannot use disableAction (type func(*kingpin.Application, *kingpin.ParseElement, *kingpin.ParseContext) error) as type kingpin.Action in argument to app.cmdMixin.flagGroup.Flag("disable", "Disable previously enabled linters.").PlaceHolder("LINTER").Short('D').Action
../../../../pkg/mod/github.com/alecthomas/gometalinter@v3.0.0+incompatible/main.go:39:99: cannot use enableAction (type func(*kingpin.Application, *kingpin.ParseElement, *kingpin.ParseContext) error) as type kingpin.Action in argument to app.cmdMixin.flagGroup.Flag("enable", "Enable previously disabled linters.").PlaceHolder("LINTER").Short('E').Action
../../../../pkg/mod/github.com/alecthomas/gometalinter@v3.0.0+incompatible/main.go:40:83: cannot use cliLinterOverrides (type func(*kingpin.Application, *kingpin.ParseElement, *kingpin.ParseContext) error) as type kingpin.Action in argument to app.cmdMixin.flagGroup.Flag("linter", "Define a linter.").PlaceHolder("NAME:COMMAND:PATTERN").Action
../../../../pkg/mod/github.com/alecthomas/gometalinter@v3.0.0+incompatible/main.go:43:56: cannot use disableAllAction (type func(*kingpin.Application, *kingpin.ParseElement, *kingpin.ParseContext) error) as type kingpin.Action in argument to app.cmdMixin.flagGroup.Flag("disable-all", "Disable all linters.").Action
../../../../pkg/mod/github.com/alecthomas/gometalinter@v3.0.0+incompatible/main.go:44:54: cannot use enableAllAction (type func(*kingpin.Application, *kingpin.ParseElement, *kingpin.ParseContext) error) as type kingpin.Action in argument to app.cmdMixin.flagGroup.Flag("enable-all", "Enable all linters.").Action
../../../../pkg/mod/github.com/alecthomas/gometalinter@v3.0.0+incompatible/main.go:200:12: cannot use loadDefaultConfig (type func(*kingpin.Application, *kingpin.ParseElement, *kingpin.ParseContext) error) as type kingpin.Action in argument to app.Action
./scripts/make-install.sh: line 4: gometalinter: command not found
make: *** [install] Error 127
last-saiyan commented 3 years ago

had similar issue, This Stackoverflow answer solves it @shawnps can i update the documentation goreportcard installation to include this

shawnps commented 3 years ago

@JonSnow47 I think this is fixed with a recent change pinning gometalinter to a version that works. Let me know if it's still broken for you.

shawnps commented 3 years ago

Feel free to reopen if this doesn't work still.

chenyanchen commented 3 years ago

@JonSnow47 I think this is fixed with a recent change pinning gometalinter to a version that works. Let me know if it's still broken for you.

It's works.