-
Notifications
You must be signed in to change notification settings - Fork 68
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 all go-staticcheck warnings #1670
base: master
Are you sure you want to change the base?
Conversation
This PR fixes all present go-staticcheck warnings in the codebase.
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.
Why are there changes in the golden files? If the output is changing, that's not just a lint change.
A number of these changes appear to be creating inconsistencies between similar functions (e.g. it appears to have removed unused function parameters, so now there are some functions that take (a, b, c)
and other functions that just take (a, c)
based on the current implementation of that function. I don't think that's actually an improvement.
Most of the goldens that are changing are removing punctuation from errors. The only valid output that changed is oracledb because there was trailing whitespace in the file that my editor trims automatically.
This is because of the unused parameters check in I'm fine with turning off the error formatting check to restore goldens to their original form. For the unused parameters, we could use |
d0e9d90
to
0bfdfe7
Compare
Staticcheck will now be configured to ignore error formatting in the confgenerator package since we rely on that formatting for output. Functions that used to take an named parameter context that was unused has that argument restored as an unnamed parameter.
0bfdfe7
to
d4d2e5e
Compare
Description
This PR fixes all present
go-staticcheck
warnings in the codebase.Everyone who I've requested a PR from was the last editor of code that was addressed according to a git blame.
Related issue
How has this been tested?
Confgenerator unit tests.
Checklist: