Skip to content

Include exclusion instructions into advice messages #1511

@Egorand

Description

@Egorand

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):

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

But this does:

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions