autonomousapps / autonomousapps/dependency-analysis-gradle-plugin

Include exclusion instructions into advice messages

Open
#1,511 1 comment 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Kotlin
Stars
2.2k
Forks
158
Avg merge
16h 25m
Merged PRs (30d)
46

Description

**Is your feature request related to a problem? Please describe.**

The plugin produced the following advice:

```
Advice for :amountslider-sample
Unused annotation processors that should be removed:
kapt libs.dagger.compiler
```

I'd like to exclude `libs.dagger.compiler` from the unused annotation processors check, but since the "exclude" API has many overloads, it's unclear how to do it correctly. E.g., this doesn't work (I'm basically just passing advice output as a string):

```kotlin
issueHandler.onUnusedAnnotationProcessors { issue ->
issue.exclude("kapt libs.dagger.compiler")
}
```

But this does:

```kotlin
issueHandler.onUnusedAnnotationProcessors { issue ->
issue.exclude(libs.dagger.compiler)
}
```

**Describe the solution you'd like**

I want the advice to include instructions on proper exclusion syntax, e.g.:

```
Advice for :amountslider-sample
Unused annotation processors that should be removed:
kapt libs.dagger.compiler

To exclude these annotation processors from the analysis:
issueHandler.onUnusedAnnotationProcessors { issue ->
issue.exclude(libs.dagger.compiler)
}
```

Or something similar.

**Describe alternatives you've considered**

Can't think of any alternatives.

**Additional context**

None.

Contributor guide

Open the contributing guide

Research direction

Start at the issueHandler.onUnusedAnnotationProcessors entry point and the issue.exclude API shown in the report. Trace how the unused annotation processors advice is assembled, then add guidance showing the proper exclusion syntax. Done means the generated advice includes a usable exclusion example for the reported processor.

Written by the indexing model from the issue text.

Assessment

Tech stack
kotlin
Domain
build-system
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.