-
Notifications
You must be signed in to change notification settings - Fork 3.1k
[chore]: fix staticcheck rules (exporter) #39192
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
Conversation
Signed-off-by: Matthieu MOREL <[email protected]>
@mmorel-35 why are we fixing this? Is there some "paper trail" we can follow to be sure that it's something we want to do? |
@mmorel-35 please make sure to answer this comment: #39192 (comment) |
Hi @douglascamata, Fixing these staticcheck issues is part of ongoing efforts to maintain code quality and adhere to best practices. The recent upgrade to golangci-lint@v2 highlighted several issues that need to be resolved. This change ensures that the codebase remains clean and maintainable, which is crucial for the long-term health of the project. There is no specific discussion or paper trail available that supports this change. The fixes are based on the options provided by golangci-lint and specially staticcheck for this PR. |
Huuuummm, I strongly disagree. Most of the automatic fixes applied here are removal of embed structs when referencing their methods or fields ( These are not "issues that need to be resolved".
All these changes do not necessarily make the codebase "clean and maintainable". For instance, we just lost some clarity on all embed method/field access across the whole codebase. A huge impact of this that wasn't taken into consideration: refactors on the methods/fields of those embed structs were easier when they were explicit (easy to spot them with simple editor tools and change them at scale without mistakes), now this will be a bit more difficult.
To me this is not the kind of change that should not happen without any previous discussion. We literally flipped something that seems to have been a standard throughout the whole codebase without talking and understanding why or the consequences. "just because the linter said so" might not be a good driver of change. |
Plus, we are not enforcing the linter check to pass with |
#### Description This fixes staticcheck issues in exporter discovered after golangci-lint@v2 upgrade Signed-off-by: Matthieu MOREL <[email protected]>
I'd argue that the majority of changes in this PR shouldn't have been made. |
#### Description This fixes staticcheck issues in exporter discovered after golangci-lint@v2 upgrade Signed-off-by: Matthieu MOREL <[email protected]>
Description
This fixes staticcheck issues in exporter discovered after golangci-lint@v2 upgrade