Skip to content
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

Fix prefer-some-in-iteration false positive on contains check #574

Merged
merged 1 commit into from
Feb 23, 2024

Conversation

anderseknert
Copy link
Member

When scalar values are on one side of e.g. 5 == input[_] we should not recommending using some, but in.

Fixes #566

When scalar values are on one side of e.g. `5 == input[_]` we should
not recommending using `some`, but `in`.

Fixes #566

Signed-off-by: Anders Eknert <anders@styra.com>
@anderseknert anderseknert merged commit 3f73ca5 into main Feb 23, 2024
3 checks passed
@anderseknert anderseknert deleted the some-in-iteration-contains-fp branch February 23, 2024 11:05
srenatus pushed a commit to srenatus/regal that referenced this pull request Oct 1, 2024
…aInc#574)

When scalar values are on one side of e.g. `5 == input[_]` we should
not recommending using `some`, but `in`.

Fixes StyraInc#566

Signed-off-by: Anders Eknert <anders@styra.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

prefer-some-in-iteration: false positive on contains check
2 participants