Skip to content

False positive at UnnecessaryPartOfBinaryExpression #5514

@BraisGabin

Description

@BraisGabin

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions