-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
Add golangci-lint, and fix linting issues #876
Conversation
36f1bcb
to
102ec4c
Compare
627305e
to
c9c0123
Compare
* deprecate go 1.10.x and 1.11.x * use golangci-lint in Travis CI * fix linting issues accordingly
* deprecate go 1.10.x and 1.11.x * use golangci-lint in Travis CI * fix linting issues accordingly
* deprecate go 1.10.x and 1.11.x * use golangci-lint in Travis CI * fix linting issues accordingly
* deprecate go 1.10.x and 1.11.x * use golangci-lint in Travis CI * fix linting issues accordingly
* deprecate go 1.10.x and 1.11.x * use golangci-lint in Travis CI * fix linting issues accordingly
* deprecate go 1.10.x and 1.11.x * use golangci-lint in Travis CI * fix linting issues accordingly
* deprecate go 1.10.x and 1.11.x * use golangci-lint in Travis CI * fix linting issues accordingly
* deprecate go 1.10.x and 1.11.x * use golangci-lint in Travis CI * fix linting issues accordingly
06836a5
to
48f9c90
Compare
* deprecate go 1.10.x and 1.11.x * use golangci-lint in Travis CI * fix linting issues accordingly
48f9c90
to
ca4e847
Compare
@jharshman, since go 1.10.x and 1.11.x are officially deprecated (see https://golang.org/doc/devel/release.html and https://endoflife.date/go), I believe we should consider this PR for inclusion in v1.0.0. This PR does not include any functional modification; it is all about using up-to-date linters and fixing outdated/broken/unused code. |
9c0851f
to
4ab14c0
Compare
* circleci: export GO111MODULE=on, add 1.13.x, remove 1.11.x * travis: add go 1.13.x
* deprecate go 1.10.x and 1.11.x * use golangci-lint in Travis CI * fix linting issues accordingly
* deprecate go 1.10.x and 1.11.x * use golangci-lint in Travis CI * fix linting issues accordingly
* deprecate go 1.10.x and 1.11.x * use golangci-lint in Travis CI * fix linting issues accordingly
* deprecate go 1.10.x and 1.11.x * use golangci-lint in Travis CI * fix linting issues accordingly
closed by #976 |
@jharshman, this issue is about adding golangci-lint to have a more complete set of linters. Then, the source code is modified to fix all the issues/bugs that are currently ignored due to a lack of linting tools. Deprecating 1.10.x and 1.11.x is an effect of enhancing the code to use modern features; not the purpose of the issue. Since #976 does not enhance nor fix linting, I'd like to have this issue reopened. |
* use golangci-lint in Travis CI * fix linting issues accordingly
* use golangci-lint in Travis CI * fix linting issues accordingly
Close #774
Close #853
Close #933
In this PR, golangci-lint is added to Travis CI. Then, multiple linting issues are fixed: errors are handled, unused variables/functions are removed, unnecessary types are removed, frequently used strings are defined as constants, etc.
As a result of usingio.StringWriter
andos.UserHomeDir
, merging this PR implies dropping support for golang 1.10.x and 1.11.x.