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
771 stars 89 forks source link

Spotbugs causes all lints to fail #187

Open vbrandl opened 6 years ago

vbrandl commented 6 years ago

Enabling the Spotbugs plugin for Gradle causes the plugin to lint every single dependency as unused-dependency while using the Findbugs plugin works fine.

The issue can be reproduced, using the following minimal build.gradle and test class:

buildscript { repositories { jcenter() } }
plugins {
    id 'java'
    id 'nebula.lint' version '9.3.4'
    id 'com.github.spotbugs' version '1.6.2'
    // id 'findbugs'
}
version = '1.0.0'
group = 'com.github.test'
repositories {
    jcenter()
}
gradleLint {
    rules = ['all-dependency']
    criticalRules = ['unused-dependency']
}
dependencies {
    compile 'commons-lang:commons-lang:2.6'
}
package com.github.test;
import org.apache.commons.lang.StringUtils;
public final class Test {
    public void main(final String[] args) {
        System.out.println(StringUtils.isBlank("foo"));
    }
}
vbrandl commented 6 years ago

Anything new on this issue?

chali commented 6 years ago

Hi @vbrandl unfortunately, we are not using unused-dependencies at this moment and we don't have spare capacity to investigate details. Sorry about that. The only thing I can suggest right now is not to enable this specific rule. Our current plan is get back to it in the following 3 months.