gradle-lint-plugin icon indicating copy to clipboard operation
gradle-lint-plugin copied to clipboard

Spotbugs causes all lints to fail

Open vbrandl opened this issue 6 years ago • 2 comments

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 avatar Aug 16 '18 09:08 vbrandl

Anything new on this issue?

vbrandl avatar Oct 05 '18 14:10 vbrandl

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.

chali avatar Oct 05 '18 15:10 chali