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

U1000: Potential False Positive On Embedding Type Aliased Interfaces In Structs #1365

MadhavJivrajani opened this issue Feb 9, 2023 · 1 comment


Copy link

What Happened

We bumped the version of staticcheck (v0.4.0) in Kubernetes to incorporate go1.20 related changes. PR: kubernetes/kubernetes#115537

We are also using go1.20 on master (ref: kubernetes/kubernetes#114502)

Due to improvements to linters, a few things were flagged, out of which one of the flagged instances seems to be a false positive.
Here are the failure logs from the failed run:

Here is part of the code that was flagged:

Before adding the comments to exclude the warnings, from the logs:

test/integration/apiserver/discovery/discovery_test.go:55:6: type `kubeClientSet` is unused (unused)
type kubeClientSet = kubernetes.Interface

Considering that the type aliases are in fact used, is this warning valid or is it a false positive? Please note that this warning did not surface on a version before v0.4.0.

Copy link

dominikh commented Feb 9, 2023

Those look like false positives, yes. Will fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet

No branches or pull requests

2 participants