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
fakexml: doesn't terminate checking type X *X
#1202
Labels
Comments
Can reproduce. |
In v0.2.2 we started reusing encoding/xml's logic for checking if types can be marshaled. We inherited its infinite loop (cf. https://go.dev/play/p/SYxLx7YKqoT which doesn't terminate). This is (probably) fine for encoding/xml, which in general doesn't support cyclic data structures, but obviously not fine for static analysis. |
type X *X
thanks a lot @dominikh |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The following code causes staticcheck v0.2.2 (
staticcheck ./...
) to hang forever.staticcheck v0.2.1 terminates quickly on the same code.
If the struct tag
xml:"operationCode"
inOperationHeaders
is omitted, staticcheck 0.2.2 also terminates.A type definition like this was generated by an xml code generator.
I don't know when such a type definition could make sense.
Go 1.17 and 1.18 compile the code without any issues.
The text was updated successfully, but these errors were encountered: