-
Notifications
You must be signed in to change notification settings - Fork 8
[TE-4860] Bump golangci-lint from 1.64.8 to 2.50.0 and update config #380
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
[TE-4860] Bump golangci-lint from 1.64.8 to 2.50.0 and update config #380
Conversation
test-engine-client is currently using golangci-lint 1.64.8 which was missing a few modern linters and formatters which are useful and we can enable.
c0b418b to
e70a32a
Compare
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.
This file was generated by the migration tool when I ran golangci-lint migrate locally. It has minor changes since then.
| presets: | ||
| - comments | ||
| - common-false-positives | ||
| - legacy | ||
| - std-error-handling |
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.
This was generated by the migrate command. https://golangci-lint.run/docs/configuration/file/#linters-configuration
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.
std-error-handling ignores this class of linting errors
internal/api/client.go:180:24: Error return value of `resp.Body.Close` is not checked (errcheck)
defer resp.Body.Close()
^
internal/runner/gotest_junit.go:58:21: Error return value of `xmlFile.Close` is not checked (errcheck)
defer xmlFile.Close()
^
internal/runner/rspec.go:202:10: Error return value of `f.Close` is not checked (errcheck)
f.Close()
^
internal/runner/rspec.go:203:12: Error return value of `os.Remove` is not checked (errcheck)
os.Remove(f.Name())
^
| paths: | ||
| - third_party$ | ||
| - builtin$ | ||
| - examples$ |
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.
Generated by the migrate tool
|
The following looks useful and are enabled in other Buildkite projects. We can stage these in later gocritic https://github.com/go-critic/go-critic I'm hesitant to bring them in just yet given there is some major code changes in flight. |
Description
test-engine-client is currently using golangci-lint 1.64.8 which was
missing a few modern linters and formatters which are useful and
we can enable.
Notably staticcheck is a popular linter which wasn't enabled.
Context
TE-4860