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

Fix compilation with go1.11 #246

Merged
merged 1 commit into from
Oct 20, 2018
Merged

Fix compilation with go1.11 #246

merged 1 commit into from
Oct 20, 2018

Conversation

amenzhinsky
Copy link

@amenzhinsky amenzhinsky commented Oct 17, 2018

Needed to update errcheck module because I was getting:

% go build ./cmd/golangci-lint
go: downloading github.com/fatih/color v1.6.0
go: downloading github.com/pkg/errors v0.8.0
go: downloading github.com/mattn/go-colorable v0.0.9
go: downloading github.com/spf13/viper v1.0.2
go: downloading github.com/sirupsen/logrus v1.0.5
go: downloading github.com/spf13/cobra v0.0.2
go: downloading github.com/OpenPeeDeeP/depguard v0.0.0-20180806142446-a69c782687b2
go: downloading github.com/golangci/govet v0.0.0-20180818181408-44ddbe260190
go: downloading github.com/golangci/errcheck v0.0.0-20180902071612-f726ab79eeeb
go: downloading github.com/golangci/unconvert v0.0.0-20180507085042-28b1c447d1f4
go: downloading github.com/golangci/gocyclo v0.0.0-20180528134321-2becd97e67ee
go: downloading github.com/golangci/unparam v0.0.0-20180902112548-7ad9dbcccc16
go: downloading golang.org/x/tools v0.0.0-20180831211245-7ca132754999
go: downloading github.com/pelletier/go-toml v1.1.0
go: downloading gopkg.in/yaml.v2 v2.2.1
go: downloading github.com/golangci/go-tools v0.0.0-20180902103155-93eecd106a0b
go: downloading github.com/golangci/dupl v0.0.0-20180902072040-3e9179ac440a
go: downloading github.com/golangci/tools v0.0.0-20180902102414-98e75f53b4b9
go: downloading github.com/golangci/lint-1 v0.0.0-20180610141402-4bf9709227d1
go: downloading github.com/spf13/jwalterweatherman v0.0.0-20180109140146-7c0cea34c8ec
go: downloading github.com/golangci/go-misc v0.0.0-20180628070357-927a3d87b613
go: downloading github.com/golangci/prealloc v0.0.0-20180630174525-215b22d4de21
go: downloading github.com/spf13/pflag v1.0.1
go: downloading github.com/golangci/gosec v0.0.0-20180901114220-8afd9cbb6cfb
go: downloading github.com/golangci/lint v0.0.0-20180902080404-c2187e7932b5
go: downloading github.com/golangci/ineffassign v0.0.0-20180808204949-2ee8f2867dde
go: downloading github.com/hashicorp/hcl v0.0.0-20180404174102-ef8a98b0bbce
go: downloading github.com/golang/mock v1.1.1
go: downloading github.com/golangci/gofmt v0.0.0-20180506063654-2076e05ced53
go: downloading github.com/magiconair/properties v1.7.6
go: downloading github.com/golangci/interfacer v0.0.0-20180902080945-01958817a6ec
go: downloading github.com/golangci/misspell v0.0.0-20180809174111-950f5d19e770
go: downloading golang.org/x/net v0.0.0-20180906233101-161cd47e91fd
go: downloading sourcegraph.com/sourcegraph/go-diff v0.0.0-20171119081133-3f415a150aec
go: downloading github.com/gobwas/glob v0.2.3
go: downloading golang.org/x/text v0.3.0
go: downloading github.com/kisielk/gotool v1.0.0
go: downloading github.com/golangci/maligned v0.0.0-20180506175553-b1d89398deca
go: downloading github.com/nbutton23/zxcvbn-go v0.0.0-20171102151520-eafdab6b0663
go: downloading github.com/mattn/go-isatty v0.0.3
go: downloading github.com/mitchellh/mapstructure v0.0.0-20180220230111-00c29f56e238
go: downloading github.com/spf13/cast v1.2.0
go: downloading github.com/golangci/check v0.0.0-20180506172741-cfe4005ccda2
go: downloading github.com/fsnotify/fsnotify v1.4.7
go: downloading github.com/spf13/afero v1.1.0
go: downloading github.com/golangci/goconst v0.0.0-20180610141641-041c5f2b40f3
go: downloading github.com/gogo/protobuf v1.0.0
go: downloading golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e
go: downloading github.com/golangci/revgrep v0.0.0-20180526074752-d9c87f5ffaf0
go: downloading sourcegraph.com/sqs/pbtypes v0.0.0-20160107090929-4d1b9dc7ffc3
go: downloading golang.org/x/crypto v0.0.0-20180505025534-4ec37c66abab
# github.com/golangci/golangci-lint/pkg/golinters
pkg/golinters/errcheck.go:32:17: undefined: golangci.RunWithConfig
pkg/golinters/errcheck.go:59:51: undefined: golangci.Config
pkg/golinters/errcheck.go:60:8: undefined: golangci.Config

BTW: what's the right way to build the binary, because building it with vendored dependencies also fails with go1.11:

% go build -mod=vendor ./cmd/golangci-lint
build golang.org/x/net/context: cannot find module for path golang.org/x/net/context

If needed I can include revendored modules that are produced by go mod vendor that seem to fix the compilation issue.

@jirfag jirfag merged commit 889e38c into golangci:master Oct 20, 2018
@jirfag
Copy link
Member

jirfag commented Oct 20, 2018

thank you!

jirfag added a commit that referenced this pull request Feb 11, 2019
$ git cherry --abbrev -v 8afd9cbb6cfb 66fb7fc33547
+ 63b25c1 Fix typo in README (#235)
+ 419c929 G107 - SSRF (#236)
+ 145f1a0 Removed wrapping feature (#238)
+ ec32ce6 Support Go 1.11 (#239)
+ 762ff3a Allow quoted strings to be used to format SQL queries (#240)
+ 7f6509a Update README.md (#246)
+ 5f98926 Refactor Dockerfile (#245)
+ d3f1980 Fix false positives for SQL string concatenation with constants from another file (#247)
+ 64d58c2 Refactor the test code sample to support multiple files per sample
+ 1ecd47e bump Dockerfile golang from 1.10 to 1.11
+ 027dc2b This fixes the html template when using '-fmt=html'  - resolves HTML escaping issues within the template  - resolves reference issues to reportInfo struct i.e. issues -> Issues, metrics -> Stats
+ 8c09a83 Add install.sh script
+ 97bc137 Add CI Installation steps and correct markdown lint errors
+ 3116b07 Fix typos in comments and rulelist (#256)
+ 443f84f Fix golint link (#263)
+ 4180994 Make G201 ignore CallExpr with no args (#262)
+ 9b966a4 add test case for strings.Builder G104 whitelist inclusion
+ adb4222 whitelist strings.Builder method in rule G104
+ ae82798 Fix the WriteSring test by handling the error
+ 2695567 Build the code sample for string builder only fron Go 1.10 onwards
+ f14f17f Add a helper function which extracts the string parameters values of a call expression
+ 9b32fca Fix the bind rule to handle the case when the arguments of the net.Listen are returned by a function call
+ 24e3094 Extend the bind rule to handle the case when the net.Listen address in provided from a const
+ 72e95e8 Geneate and upload the test coverage report to codecove.io
+ 12400f9 Update README with the code coverage batch
+ 14ed63d Do not flag the unhandled errors which are explicitly ignored
+ f87af5f Detect the unhandled errors even though they are explicitly ignored if the 'audit: enabled' setting is defined in the global configuration (#274)
+ 5d33e6e Update the README with some details about the configuration file
+ b662615 Fix typo
+ a966ff7 Fix -conf example in README.md
+ 04ce7ba add a no-fail flag
+ e2752bc revert to default GOPATH if necessary (#279)
- c04360f make API
+ 66fb7fc Replace import paths
@ldez ldez added this to the v1.11 milestone Mar 6, 2024
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

Successfully merging this pull request may close these issues.

3 participants