spotbugs/sonar-findbugs

Exclude folder for findbugs through Sonarqube scan

yramya20 opened this issue · 2 comments

Hello Team,

I’m using sonarqube 8.9v and i get the below error for findbugs during sonar scan.

Can you help me how to fix this and also incase I want to exclude it then how do I exclude a folder or file from findbugs?
Also this issue doesn’t occur for branch analysis, it is all good with branch analysis (both source and target branches). Issue occurs only for PR analysis.
Please help

ERROR] Failed to execute goal org.sonarsource.scanner.maven:sonar-maven-plugin:3.7.0.1746:sonar (default-cli) on project : Can not execute Findbugs: One (sub)project contains Java source files that are not compiled → [Help 1]ERROR] Failed to execute goal org.sonarsource.scanner.maven:sonar-maven-plugin:3.7.0.1746:sonar (default-cli) on project : Can not execute Findbugs: One (sub)project contains Java source files that are not compiled . → [Help 1]

What version of the plugin are you using?
Since this is only happening for PR analysis I think upgrading to 4.2.0 might solve this error.

Normally SpotBugs should only report issues on files that are in the Sonar analysis scope, even if it currenty needs to analyse the entire project. You can refer to: https://docs.sonarqube.org/latest/project-administration/narrowing-the-focus/

I will close this as there does not seem to be further questions, please don't hesitate to create a new issue