Skip to content

Irrelevant UnusedPrivateMember warnings on detekt 2.0.0 from IJ plugin #538

@kevinguitar

Description

@kevinguitar

Hello 👋

After updating to detekt 2.0.0-alpha.1, we noticed an irrelevant warning in the IDE (Android Studio)

@Composable
fun Foo() = Unit

@Preview
@Composable
private fun Foo_Preview() = Foo()

This is the rule setting
Image

Confirmed that in Settings -> Tools -> Detekt, the config location is set correctly.

Expected Behavior

Detekt should not report this if the environment is using detekt 2.x?

Observed Behavior

Detekt reports UnusedPrivateMember on Foo_Preview
Image

Your Environment

  • Version of detekt used: 2.0.0-alpha.1
  • Version of detekt IJ plugin used: 2.4.3
  • Version of Gradle used (if applicable): Gradle 9.2 (AGP 8.13.2)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions