I’m trying to get sonar to also report spotbugs reports, but as it seems right now they are not picked up.
Running gradlew check generates a file in build/reports/spotbugs/main.xml, as well as the html, and the code has some bugs found, but they are not seen in sonar. My build.gradle config:
sonarqube {
properties {
property "sonar.verbose", "true"
property "sonar.projectKey", "***"
property "sonar.host.url", "***"
property "sonar.login", "***"
property "sonar.core.codeCoveragePlugin", "jacoco"
property "sonar.coverage.jacoco.xmlReportPaths", "build/reports/jacoco/jacocoReport.xml"
property "sonar.java.checkstyle.reportPaths", "build/reports/checkstyle/main.xml,build/reports/checkstyle/test.xml"
property "sonar.java.spotbugs.reportPaths", "build/reports/spotbugs/main.xml,build/reports/spotbugs/test.xml"
}
}
spotbugs {
ignoreFailures = true
showProgress = true
excludeFilter = file("${projectDir}/config/spotbugs/exclude.xml")
}
spotbugsMain {
reports {
html {
required = true
}
xml {
required = true
}
}
}
spotbugsTest {
reports {
html {
required = true
}
xml {
required = true
}
}
}
The project is using Java, the reports for checkstyle show up as they should, Sonar on it’s own succeeds, other issues appear just fine, but nothing in BugCollection xml element shows up. Am I missing some configuration?