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: field is unused #1360
Labels
Comments
Fixed on master, will be backported to a release by Monday. |
Closed
4 tasks
@dominikh Is there a release tag where the fix for this issue has been backported to? |
dominikh
added a commit
that referenced
this issue
Feb 14, 2023
When converting between two struct types, the fields use each other. However, we mustn't track the fields in a struct type from another package, as they should always be considered used, and we may end up creating nodes for them without ever recording uses. The old implementation of unused behaved correctly; we accidentally dropped a check. Closes gh-1360. (cherry picked from commit 4ceb5b2)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
staticcheck version: staticcheck 2023.1 (v0.4.0)
go version: go version go1.19.5 darwin/arm64
PoC:
staticcheck output:
FormatterArgs does not have the required json format, so a structure with the same but json fields is set. It is used for http response.
I think this is a false positive.
The text was updated successfully, but these errors were encountered: