Closed pohly closed 1 year ago
Thanks for reporting that @pohly.
Could you please tell what is the signature of e2epod.Get
?
Asking because ginkgolinter does check for return values of function; i.e.
case *gotypes.Signature, *gotypes.Chan, *gotypes.Pointer: // do nothing
The gotypes.Signature
should cover it, in theory. So I want to try reproduce the issue.
@nunnatsa I believe you can find the function here:
Describe the bug
The following finding is a false positive:
It's a false positive because
e2epod.Get
is a function call which returns a function. That function gets called byConsistently
repeatedly.Expected behavior
I suspect this occurs because ginkgolinter checks whether the parameter is a function call expression. What it should do instead is check what the type of the expression is. Functions and channels are okay, everything else isn't.
Environment:
Additional context
This can be worked around: