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

False positive at UnnecessaryPartOfBinaryExpression #5514

Closed
BraisGabin opened this issue Nov 7, 2022 · 0 comments · Fixed by #5516
Closed

False positive at UnnecessaryPartOfBinaryExpression #5514

BraisGabin opened this issue Nov 7, 2022 · 0 comments · Fixed by #5516

Comments

@BraisGabin
Copy link
Collaborator

I created a test to demostrate the bug:

    @Test
    fun `Don't raise issues with pair creation`() {
        val code = """
            fun foo() {
                1 to 1
            }
        """.trimIndent()

        val findings = UnnecessaryPartOfBinaryExpression().compileAndLint(code)
        assertThat(findings).hasSize(0)
    }

Your Environment

  • Version of detekt used: 1.22.0-RC3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant