-
Notifications
You must be signed in to change notification settings - Fork 6
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
[BUG] type checker gives false positive for WithTransform + ContainElement #115
Labels
bug
Something isn't working
Comments
Thanks for letting me know, @LittleFox94! |
@LittleFox94 - would you like to review the fix? #116 |
13 tasks
Heya, sorry for my late reply .. seems to be ok now - thank you :) |
The fix is included in golangci-lint version v1.55.2 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
The text was updated successfully, but these errors were encountered: