nebula-plugins / gradle-lint-plugin

A pluggable and configurable linter tool for identifying and reporting on patterns of misuse or deprecations in Gradle scripts.
Apache License 2.0
761 stars 88 forks source link

False positive when excluding transitive dependency #366

Open hkupty opened 2 years ago

hkupty commented 2 years ago

Hi, I'm using nebula-plugins to help me migrate from maven to gradle and it really did help figuring out either missing declared dependencies or unnecessary dependencies. However, it is giving me a few false-positives. From what I can see, those happen when the dependency is declared w/ an interpolated version number. The most obvious case is this one where I'm excluding a transitive dependency that is explicitly declared in said package's pom.xml but shows up as an unused exclude.

warning   unused-exclude-by-dep              the excluded dependency is not a transitive of org.litote.kmongo:kmongo-flapdoodle:$kmongoVersion, so has no effect. See https://github.com/nebula-plugins/gradle-lint-plugin/wiki/Unused-Exclude-Rule for more details
libs/kotlin/test-utils/build.gradle:20
exclude group: 'org.slf4j', module: 'slf4j-simple'
boris-petrov commented 2 years ago

I believe this is a duplicate of #224.