Closed LittleFox94 closed 8 months ago
Thanks for letting me know, @LittleFox94!
@LittleFox94 - would you like to review the fix? https://github.com/nunnatsa/ginkgolinter/pull/116
Heya, sorry for my late reply .. seems to be ok now - thank you :)
The fix is included in golangci-lint version v1.55.2
Describe the bug The new type check linting gives a false positive when using a
WithTransform
to transform e.g. an[]int
into an[]string
together withContainElement(string)
:ginkgo-linter: use ContainElement with different types: Comparing []string with string; either change the expected value type if possible, or use the BeEquivalentTo() matcher, instead of ContainElement() (ginkgolinter)
To Reproduce
Expected behavior Using
ContainElement(string)
on the output of aWithTransform
function that returns a[]string
is correct and the linter should not report an error for that.Environment:
Additional context
Originally spotted in our CI here, the problematic code being here.