Skip to content
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

reflect linter feedback, remove unused arguments and redundant type from arrays #2739

Merged
merged 3 commits into from
Aug 27, 2024

Conversation

FxKu
Copy link
Member

@FxKu FxKu commented Aug 23, 2024

The amount of problems reported by the linter - mainly redundant type declarations - made it hard to see problems such as nil references and unused variables. With this PR merged no more problems should be reported - at least in VSCode

@FxKu FxKu added the minor label Aug 23, 2024
@FxKu FxKu added this to the 1.14.0 milestone Aug 23, 2024
@FxKu
Copy link
Member Author

FxKu commented Aug 27, 2024

👍

}
c.logger.Infof("customResourceDefinition %q is registered", crd.Name)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Curious if this logs nil in some edge cases.

Copy link
Member

@macedigital macedigital left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me.

go-staticcheck highlights a few more cases, but we can fix those later 1.

Footnotes

  1. Example without arguments to formatter https://github.com/zalando/postgres-operator/blob/a6c40dad785a229b5e69b0de757f2158c80bd10b/pkg/cluster/util.go#L260

@FxKu FxKu merged commit 2ae51fb into master Aug 27, 2024
10 checks passed
@FxKu FxKu deleted the more-linter-fixes branch August 27, 2024 15:56
@FxKu FxKu changed the title reflect linter feedback, remove unused argumnents and redundant type from arrays reflect linter feedback, remove unused arguments and redundant type from arrays Aug 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants