-
Notifications
You must be signed in to change notification settings - Fork 58
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
Update golangci-lint to v1.63.4 and resolve warnings #1455
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Austin Vazquez <[email protected]>
Signed-off-by: Austin Vazquez <[email protected]>
So I get the idea behind not shadowing builtin functions but it but it feels like it's overcorrecting a bit, e.g. min and max here are very clearly the minimum and maximum duration and having to restate that is a bit silly. Is it worth disabling this? Or maybe we should just use better variable names :p |
Open to other suggestions if other variable names? |
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.
minBackoff
and maxBackoff
would also be reasonable, but I don't think it's that important.
The likelihood that we have an issue with this is low, but it's also good hygiene to not shadow builtins.
I'm less hung up on your specific replacements and more so hung up on the fact that it doesn't allow us to use these variable names at all, e.g. it seems that we can no longer call any variable "min" in any context anymore even if it makes sense. That's the part that kind of irks me. I do agree with Kern that this is generally a good practice, though, and given the vastness of the codebase and how few false positives we have, I guess it's reasonable to assume this shouldn't really ever be a problem. |
Issue #, if available:
n/a
Description of changes:
This change updates golangci-lint to v1.63.4 and resolves new linter warnings for shadowing of built-in functions.
Testing performed:
CI
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.