Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support Go 1.11 modules #205

Closed
ryboe opened this issue Aug 25, 2018 · 2 comments
Closed

Support Go 1.11 modules #205

ryboe opened this issue Aug 25, 2018 · 2 comments

Comments

@ryboe
Copy link
Contributor

ryboe commented Aug 25, 2018

> go version
go version go1.11 darwin/amd64
> go get github.com/golangci/golangci-lint/cmd/golangci-lint                                                                                                                
go: finding github.com/golangci/golangci-lint/cmd/golangci-lint latest
go: finding github.com/golangci/golangci-lint/cmd latest
go: finding github.com/golangci/lint-1 latest
go: finding github.com/golangci/maligned latest
go: finding github.com/GoASTScanner/gas latest
go: finding github.com/GoASTScanner/gas/rules latest
go: finding github.com/golangci/gocyclo/pkg/gocyclo latest
go: finding github.com/golangci/revgrep latest
go: finding github.com/golangci/check/cmd/varcheck latest
go: finding github.com/golangci/gocyclo/pkg latest
go: finding github.com/golangci/gocyclo latest
go: finding github.com/golangci/check/cmd/structcheck latest
go: finding github.com/golangci/check/cmd latest
go: finding github.com/golangci/check latest
go: finding golang.org/x/tools/go/loader latest
go: finding golang.org/x/tools/go/ssa/ssautil latest
go: finding golang.org/x/tools/go/ssa latest
go: finding github.com/golangci/unconvert latest
go: finding golang.org/x/tools/go latest
go: finding golang.org/x/tools latest
go: finding honnef.co/go/tools/staticcheck latest
go: finding honnef.co/go/tools/lint latest
go: finding honnef.co/go/tools/simple latest
go: finding honnef.co/go/tools/lint/lintutil latest
go: finding honnef.co/go/tools/unused latest
go: finding sourcegraph.com/sourcegraph/go-diff/diff latest
go: finding honnef.co/go/tools latest
go: finding sourcegraph.com/sourcegraph/go-diff latest
go: finding github.com/golangci/gofmt/goimports latest
go: finding github.com/golangci/prealloc latest
go: finding github.com/golangci/gofmt/gofmt latest
go: finding github.com/golangci/gofmt latest
go: finding github.com/kisielk/errcheck/golangci latest
go: finding github.com/golangci/ineffassign latest
go: finding github.com/OpenPeeDeeP/depguard latest
go: finding github.com/golangci/govet latest
go: finding github.com/golangci/go-misc/deadcode latest
go: finding github.com/golangci/goconst latest
go: finding mvdan.cc/unparam/check latest
go: finding github.com/golangci/go-misc latest
go: finding mvdan.cc/unparam latest
go: finding mvdan.cc/interfacer/check latest
go: finding mvdan.cc/interfacer latest
go: finding github.com/spf13/jwalterweatherman latest
go: finding github.com/nbutton23/zxcvbn-go latest
go: finding github.com/hashicorp/hcl latest
go: finding github.com/hashicorp/hcl/hcl/printer latest
go: finding github.com/hashicorp/hcl/hcl latest
go: finding github.com/securego/gosec latest
go: finding mvdan.cc/lint latest
go: finding github.com/gogo/protobuf/proto latest
go: finding sourcegraph.com/sqs/pbtypes latest
go: finding golang.org/x/sys/unix latest
go: finding golang.org/x/sys latest
go: finding golang.org/x/crypto/ssh/terminal latest
go: finding golang.org/x/crypto/ssh latest
go: finding golang.org/x/crypto latest
go: finding golang.org/x/text/width latest
build github.com/golangci/golangci-lint/cmd/golangci-lint: cannot find module for path github.com/kisielk/errcheck/golangci

The problem seems to be that the go tool is ignoring the github.com/kisielk/errcheck/golangci package in vendor. It gets confused because there is no package on GitHub at that path. Perhaps the path should be github.com/golangci/errcheck?

@jirfag
Copy link
Contributor

jirfag commented Aug 27, 2018

hi!
the preferred way to install golangci-lint is to use binary releases.
But I'm planning to support go modules.

golangci pushed a commit that referenced this issue Sep 2, 2018
golangci pushed a commit that referenced this issue Sep 2, 2018
@jirfag
Copy link
Contributor

jirfag commented Sep 2, 2018

v1.10.2 supports installation via go modules:

$ export GO111MODULE=on
$ go mod init && go get -v github.com/golangci/golangci-lint/cmd/golangci-lint
go: finding github.com/golangci/golangci-lint/cmd/golangci-lint latest
go: finding github.com/golangci/golangci-lint/cmd latest
go: finding github.com/golangci/golangci-lint v1.10.2
go: downloading github.com/golangci/golangci-lint v1.10.2
Fetching https://golang.org/x/sys?go-get=1
go: finding github.com/kisielk/gotool v1.0.0
go: finding github.com/nbutton23/zxcvbn-go v0.0.0-20171102151520-eafdab6b0663
go: finding github.com/golang/mock v1.1.1
Parsing meta tags from https://golang.org/x/sys?go-get=1 (status code 200)
get "golang.org/x/sys": found meta tag get.metaImport{Prefix:"golang.org/x/sys", VCS:"git", RepoRoot:"https://go.googlesource.com/sys"} at https://golang.org/x/sys?go-get=1
go: finding github.com/golangci/maligned v0.0.0-20180506175553-b1d89398deca
go: finding github.com/pmezard/go-difflib v1.0.0
go: finding github.com/golangci/revgrep v0.0.0-20180526074752-d9c87f5ffaf0
go: finding github.com/fsnotify/fsnotify v1.4.7
go: finding github.com/StackExchange/wmi v0.0.0-20180116203802-5d049714c4a6
go: finding github.com/spf13/viper v1.0.2
go: finding golang.org/x/sys v0.0.0-20180504064212-6f686a352de6
go: finding github.com/golangci/unconvert v0.0.0-20180507085042-28b1c447d1f4
Fetching https://golang.org/x/text?go-get=1
Parsing meta tags from https://golang.org/x/text?go-get=1 (status code 200)
get "golang.org/x/text": found meta tag get.metaImport{Prefix:"golang.org/x/text", VCS:"git", RepoRoot:"https://go.googlesource.com/text"} at https://golang.org/x/text?go-get=1
Fetching https://gopkg.in/yaml.v2?go-get=1
go: finding github.com/golangci/tools v0.0.0-20180902102414-98e75f53b4b9
go: finding github.com/golangci/ineffassign v0.0.0-20180808204949-2ee8f2867dde
go: finding golang.org/x/text v0.3.0
go: finding github.com/fatih/color v1.6.0
go: finding github.com/spf13/cast v1.2.0
Fetching https://golang.org/x/tools?go-get=1
go: finding github.com/hashicorp/hcl v0.0.0-20180404174102-ef8a98b0bbce
Parsing meta tags from https://gopkg.in/yaml.v2?go-get=1 (status code 200)
get "gopkg.in/yaml.v2": found meta tag get.metaImport{Prefix:"gopkg.in/yaml.v2", VCS:"git", RepoRoot:"https://gopkg.in/yaml.v2"} at https://gopkg.in/yaml.v2?go-get=1
go: finding gopkg.in/yaml.v2 v2.2.1
go: finding github.com/golangci/misspell v0.0.0-20180809174111-950f5d19e770
go: finding github.com/gogo/protobuf v1.0.0
go: finding github.com/pelletier/go-toml v1.1.0
go: finding github.com/mattn/go-isatty v0.0.3
go: finding github.com/davecgh/go-spew v1.1.0
go: finding github.com/gobwas/glob v0.2.3
go: finding github.com/shirou/gopsutil v0.0.0-20180427012116-c95755e4bcd7
Parsing meta tags from https://golang.org/x/tools?go-get=1 (status code 200)
get "golang.org/x/tools": found meta tag get.metaImport{Prefix:"golang.org/x/tools", VCS:"git", RepoRoot:"https://go.googlesource.com/tools"} at https://golang.org/x/tools?go-get=1
go: finding golang.org/x/tools v0.0.0-20180831211245-7ca132754999
go: finding github.com/golangci/govet v0.0.0-20180818181408-44ddbe260190
go: finding github.com/magiconair/properties v1.7.6
go: finding github.com/golangci/gocyclo v0.0.0-20180528134321-2becd97e67ee
go: finding github.com/go-ole/go-ole v1.2.1
go: finding github.com/sirupsen/logrus v1.0.5
go: finding github.com/stretchr/testify v1.2.1
Fetching https://sourcegraph.com/sourcegraph/go-diff?go-get=1
Parsing meta tags from https://sourcegraph.com/sourcegraph/go-diff?go-get=1 (status code 200)
get "sourcegraph.com/sourcegraph/go-diff": found meta tag get.metaImport{Prefix:"sourcegraph.com/sourcegraph/go-diff", VCS:"git", RepoRoot:"https://github.com/sourcegraph/go-diff"} at https://sourcegraph.com/sourcegraph/go-diff?go-get=1
go: finding sourcegraph.com/sourcegraph/go-diff v0.0.0-20171119081133-3f415a150aec
go: finding github.com/mattn/go-colorable v0.0.9
go: finding github.com/spf13/afero v1.1.0
go: finding github.com/mitchellh/go-ps v0.0.0-20170309133038-4fdf99ab2936
go: finding github.com/golangci/go-tools v0.0.0-20180902103155-93eecd106a0b
go: finding github.com/golangci/dupl v0.0.0-20180902072040-3e9179ac440a
Fetching https://golang.org/x/net?go-get=1
Parsing meta tags from https://golang.org/x/net?go-get=1 (status code 200)
go: finding github.com/inconshreveable/mousetrap v1.0.0
get "golang.org/x/net": found meta tag get.metaImport{Prefix:"golang.org/x/net", VCS:"git", RepoRoot:"https://go.googlesource.com/net"} at https://golang.org/x/net?go-get=1
go: finding github.com/pkg/errors v0.8.0
go: finding golang.org/x/net v0.0.0-20180826012351-8a410e7b638d
go: finding github.com/spf13/cobra v0.0.2
go: finding github.com/golangci/lint-1 v0.0.0-20180610141402-4bf9709227d1
go: finding github.com/spf13/pflag v1.0.1
go: finding github.com/golangci/gosec v0.0.0-20180901114220-8afd9cbb6cfb
go: finding github.com/golangci/check v0.0.0-20180506172741-cfe4005ccda2
go: finding github.com/golangci/go-misc v0.0.0-20180628070357-927a3d87b613
go: finding github.com/shirou/w32 v0.0.0-20160930032740-bb4de0191aa4
go: finding github.com/OpenPeeDeeP/depguard v0.0.0-20180806142446-a69c782687b2
go: finding github.com/golangci/unparam v0.0.0-20180902112548-7ad9dbcccc16
go: finding github.com/golangci/interfacer v0.0.0-20180902080945-01958817a6ec
Fetching https://gopkg.in/check.v1?go-get=1
Parsing meta tags from https://gopkg.in/check.v1?go-get=1 (status code 200)
get "gopkg.in/check.v1": found meta tag get.metaImport{Prefix:"gopkg.in/check.v1", VCS:"git", RepoRoot:"https://gopkg.in/check.v1"} at https://gopkg.in/check.v1?go-get=1
go: finding gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405
go: finding github.com/spf13/jwalterweatherman v0.0.0-20180109140146-7c0cea34c8ec
go: finding github.com/golangci/prealloc v0.0.0-20180630174525-215b22d4de21
go: finding github.com/golangci/lint v0.0.0-20180902080404-c2187e7932b5
go: finding github.com/mitchellh/mapstructure v0.0.0-20180220230111-00c29f56e238
Fetching https://sourcegraph.com/sqs/pbtypes?go-get=1
go: finding github.com/golangci/goconst v0.0.0-20180610141641-041c5f2b40f3
go: finding github.com/golangci/lint v0.0.0-20170908181259-c2187e7932b5
go: finding golang.org/x/tools v0.0.0-20180826000951-f6ba57429505
Parsing meta tags from https://sourcegraph.com/sqs/pbtypes?go-get=1 (status code 200)
get "sourcegraph.com/sqs/pbtypes": found meta tag get.metaImport{Prefix:"sourcegraph.com/sqs/pbtypes", VCS:"git", RepoRoot:"https://github.com/sqs/pbtypes"} at https://sourcegraph.com/sqs/pbtypes?go-get=1
Fetching https://golang.org/x/crypto?go-get=1
go: finding sourcegraph.com/sqs/pbtypes v0.0.0-20160107090929-4d1b9dc7ffc3
Parsing meta tags from https://golang.org/x/crypto?go-get=1 (status code 200)
get "golang.org/x/crypto": found meta tag get.metaImport{Prefix:"golang.org/x/crypto", VCS:"git", RepoRoot:"https://go.googlesource.com/crypto"} at https://golang.org/x/crypto?go-get=1
go: finding golang.org/x/crypto v0.0.0-20180505025534-4ec37c66abab
go: finding github.com/golangci/errcheck v0.0.0-20180902071612-f726ab79eeeb
go: finding github.com/golangci/gofmt v0.0.0-20180506063654-2076e05ced53
go: finding golang.org/x/tools v0.0.0-20180221164845-07fd8470d635
go: downloading github.com/fatih/color v1.6.0
go: downloading github.com/pkg/errors v0.8.0
go: downloading github.com/spf13/cobra v0.0.2
go: downloading golang.org/x/tools v0.0.0-20180831211245-7ca132754999
go: downloading github.com/golangci/tools v0.0.0-20180902102414-98e75f53b4b9
go: downloading github.com/spf13/pflag v1.0.1
go: downloading github.com/spf13/viper v1.0.2
go: downloading github.com/golang/mock v1.1.1
go: downloading github.com/sirupsen/logrus v1.0.5
go: downloading github.com/mattn/go-colorable v0.0.9
go: downloading github.com/fsnotify/fsnotify v1.4.7
go: downloading github.com/mitchellh/mapstructure v0.0.0-20180220230111-00c29f56e238
go: downloading sourcegraph.com/sourcegraph/go-diff v0.0.0-20171119081133-3f415a150aec
go: downloading github.com/golangci/ineffassign v0.0.0-20180808204949-2ee8f2867dde
go: downloading github.com/golangci/gofmt v0.0.0-20180506063654-2076e05ced53
go: downloading github.com/mattn/go-isatty v0.0.3
go: downloading github.com/golangci/go-tools v0.0.0-20180902103155-93eecd106a0b
go: downloading github.com/spf13/cast v1.2.0
go: downloading github.com/golangci/lint-1 v0.0.0-20180610141402-4bf9709227d1
go: downloading github.com/OpenPeeDeeP/depguard v0.0.0-20180806142446-a69c782687b2
go: downloading github.com/golangci/gosec v0.0.0-20180901114220-8afd9cbb6cfb
go: downloading github.com/golangci/gocyclo v0.0.0-20180528134321-2becd97e67ee
go: downloading github.com/hashicorp/hcl v0.0.0-20180404174102-ef8a98b0bbce
go: downloading github.com/spf13/afero v1.1.0
go: downloading gopkg.in/yaml.v2 v2.2.1
go: downloading github.com/golangci/unparam v0.0.0-20180902112548-7ad9dbcccc16
go: downloading github.com/golangci/govet v0.0.0-20180818181408-44ddbe260190
go: downloading github.com/magiconair/properties v1.7.6
go: downloading github.com/golangci/unconvert v0.0.0-20180507085042-28b1c447d1f4
go: downloading github.com/golangci/dupl v0.0.0-20180902072040-3e9179ac440a
go: downloading github.com/golangci/prealloc v0.0.0-20180630174525-215b22d4de21
go: downloading sourcegraph.com/sqs/pbtypes v0.0.0-20160107090929-4d1b9dc7ffc3
go: downloading golang.org/x/text v0.3.0
go: downloading github.com/golangci/check v0.0.0-20180506172741-cfe4005ccda2
go: downloading golang.org/x/crypto v0.0.0-20180505025534-4ec37c66abab
go: downloading github.com/golangci/errcheck v0.0.0-20180902071612-f726ab79eeeb
go: downloading golang.org/x/net v0.0.0-20180826012351-8a410e7b638d
go: downloading golang.org/x/sys v0.0.0-20180504064212-6f686a352de6
go: downloading github.com/spf13/jwalterweatherman v0.0.0-20180109140146-7c0cea34c8ec
go: downloading github.com/golangci/revgrep v0.0.0-20180526074752-d9c87f5ffaf0
go: downloading github.com/gogo/protobuf v1.0.0
go: downloading github.com/kisielk/gotool v1.0.0
go: downloading github.com/golangci/go-misc v0.0.0-20180628070357-927a3d87b613
go: downloading github.com/nbutton23/zxcvbn-go v0.0.0-20171102151520-eafdab6b0663
go: downloading github.com/golangci/interfacer v0.0.0-20180902080945-01958817a6ec
go: downloading github.com/gobwas/glob v0.2.3
go: downloading github.com/golangci/lint v0.0.0-20180902080404-c2187e7932b5
go: downloading github.com/golangci/misspell v0.0.0-20180809174111-950f5d19e770
go: downloading github.com/golangci/goconst v0.0.0-20180610141641-041c5f2b40f3
go: downloading github.com/golangci/maligned v0.0.0-20180506175553-b1d89398deca
go: downloading github.com/pelletier/go-toml v1.1.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants