-
Notifications
You must be signed in to change notification settings - Fork 9.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
remove unnecessary else block on test #16897
Comments
Hey @moficodes - Thanks for raising this, which The project currently uses I note pull request #16889 is related to this. If we proceed with fixing this which I'm not opposed to, ideally we would also bump golangci-lint to a version which identifies this issue and fix any other instances detected (if any). |
I think we kept golangci-lint old to avoid allowing go1.21 features. I think we should revisit this decision. |
This failed on 1.55.2. This is the only linting error that comes up. |
If we want to keep it at that version, I think we need to update Contributing docs to make sure developers have the correct environment setup. |
Based on the discussion in #16661 (comment) the 1.21 discussion was in relation to the use of new builtins rather than updating golangci-lint specifically? I agree we should try and update the project version and if there is a blocker update |
With #16889 merged latest @moficodes would you be able to raise a pr to propose adopting this version? |
On it! Should I create a new Issue? or this is good? |
We can do it under this issue ☺ |
fixes: etcd-io#16897 update golangci-lint version to the latest to keep the codebase linting up to date. Signed-off-by: Mofi Rahman <[email protected]>
fixes: etcd-io#16897 update golangci-lint version to the latest to keep the codebase linting up to date Signed-off-by: Mofi Rahman <[email protected]>
fixes: etcd-io#16897 update golangci-lint version to the latest to keep the codebase linting up to date Signed-off-by: Mofi Rahman <[email protected]>
What would you like to be added?
in etcdserver/api/v3discovery/discovery_test.go:266:9
else {
fkv.t.Errorf("unexpected key: %s", key)
return nil, fmt.Errorf("unexpected key: %s", key)
}
We can remove the
else
block and return right away.Why is this needed?
make verify
fails with indent-error-flow: if block ends with a return statement, so drop this else and outdent its block (revive).The text was updated successfully, but these errors were encountered: