-
Notifications
You must be signed in to change notification settings - Fork 86
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
golangci-lint bump to 1.49.0 along with required resolutions #382
Conversation
Signed-off-by: Ken Sipe <kensipe@gmail.com>
Signed-off-by: Ken Sipe <kensipe@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a minor comment we can address as part of another PR
- stylecheck | ||
- unconvert | ||
- unparam | ||
- unused | ||
- varcheck | ||
run: | ||
go: '1.17' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know is not part of this PR but, should this be modified?
go: '1.17' | |
go: '1.18' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@iblancasa the project went to go 1.18 early. In those early days many of the linters broke. there were negative consequences of running as 1.18 (as well as some for running as 1.17). Running as 1.17 made the most sense at the time... but it is definitely worth revisiting that now. thanks for calling it out! I will review now to see the consequences.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
switching to running 1.18 linters results in the following disable linters. I'm surprised this is still the case.
WARN [linters context] gosimple is disabled because of go1.18. You can track the evolution of the go1.18 support by following the https://github.com/golangci/golangci-lint/issues/2649.
WARN [linters context] staticcheck is disabled because of go1.18. You can track the evolution of the go1.18 support by following the https://github.com/golangci/golangci-lint/issues/2649.
WARN [linters context] structcheck is disabled because of go1.18. You can track the evolution of the go1.18 support by following the https://github.com/golangci/golangci-lint/issues/2649.
WARN [linters context] stylecheck is disabled because of go1.18. You can track the evolution of the go1.18 support by following the https://github.com/golangci/golangci-lint/issues/2649.
WARN [linters context] unparam is disabled because of go1.18. You can track the evolution of the go1.18 support by following the https://github.com/golangci/golangci-lint/issues/2649.
WARN [linters context] unused is disabled because of go1.18. You can track the evolution of the go1.18 support by following the https://github.com/golangci/golangci-lint/issues/2649.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Interesting. I think we can leave it there.
Thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@iblancasa the logic behind stay with go1.17 running of linters is we can't write and have 1.18 style code linted (so no generics) but we get all the 1.17 linting.
…lder#382) * golangci-lint bump to 1.49.0 along with required resolutions * Replaced deprecated call in APIServer testenv Signed-off-by: Ken Sipe <kensipe@gmail.com> Signed-off-by: Israel Blancas <iblancasa@gmail.com>
Bump linter to 1.49.0
Signed-off-by: Ken Sipe kensipe@gmail.com