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

Report unused `exclude` clauses in dependencies

Open boris-petrov opened this issue 11 months ago • 3 comments

Is your feature request related to a problem? Please describe. It's not a problem but is a nice feature to have.

Describe the solution you'd like Say I have this script:

implementation('some:dependency:1.0.0') {
  exclude group: 'this.is.not.actually.a', module: 'dependency'
}

some:dependency doesn't have this.is.not.actually.a:dependency as a dependency. Or it used to but I've updated it to a new version and now it doesn't. It would be nice to get a report that this exclusion is unneeded.

Describe alternatives you've considered N/A

Additional context Gradle Lint has a similar feature.

boris-petrov avatar Feb 02 '25 11:02 boris-petrov

Thanks for the request! It is unlikely to be worked on in the foreseeable future. It might also be out of scope, but I'm not totally sure of that and could be convinced it's a good feature for this plugin. My intuition says it belongs in something separate (like Gradle Lint). In fact, is there a reason Gradle Lint isn't working for you?

autonomousapps avatar Feb 09 '25 19:02 autonomousapps

Thanks for the response! Well, Gradle Lint has so many issues I don't know where to begin. For example this one. I don't think they'll ever fix them.

As for why that's a good feature - well, dependency-analysis-gradle-plugin is a Gradle plugin for analyzing dependencies, right? It's in the name! And unused exclude clauses are a problem that concern dependencies. So it's kind of related. :) It's nothing urgent but I think it would be a nice addition to the already big list of nice features of this plugin.

boris-petrov avatar Feb 11 '25 08:02 boris-petrov

Thanks for the response! I won't have time for this, but I could be open to a PR.

autonomousapps avatar Feb 11 '25 17:02 autonomousapps