Skip to content

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

👍

} else {
c.logger.Infof("customResourceDefinition %q has been registered", crd.Name)
}
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
@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.

3 participants