dependency-analysis-gradle-plugin icon indicating copy to clipboard operation
dependency-analysis-gradle-plugin copied to clipboard

Detect if the plugin `kotlin-parcelize` is not used

Open BraisGabin opened this issue 3 years ago • 3 comments

Is your feature request related to a problem? Please describe. Detect unused if a module declares the plugin id("kotlin-parcelize") and doesn't use it.

Describe the solution you'd like Raise a suggestion to remove kotlin-parcelize if the annotation @Parcelize is not used.

BraisGabin avatar Oct 27 '22 15:10 BraisGabin

@BraisGabin would you mind contributing a failing test?

autonomousapps avatar Nov 14 '22 17:11 autonomousapps

Sure! But I'm not sure how to contribute a test. I was checking for tests related with the kapt advice but I couldn't find any. And even removing code related with the kapt advice ./gradlew test is still green.

Is there any similar test so I can follow the pattern?

BraisGabin avatar Nov 15 '22 17:11 BraisGabin

Hm let me restate. You really can't contribute a failing test because the plugin wouldn't have any reason to fail in the presence of this unused plugin. So what you could do is contribute a test that would fail if that feature existed.

If you take a look at AnnotationProcessorSpec, you'll see a bunch of tests relating to kapt.

autonomousapps avatar Nov 15 '22 18:11 autonomousapps