-
Notifications
You must be signed in to change notification settings - Fork 133
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sonar scan fails if there are no class files available #46
Comments
Please give more details about your project. Why are there no class? Are some Java files compiled or none? This behavior is as design. This is to avoid creating jobs that run Sonar analysis and forgetting about the compilation. It is a safe guard to make sure the plugin is not giving an A+ placebo result. |
We also have this problem. We run a standard sonarqube on all jars we create via maven, and have resource only jars. These resource only jars have package-info.java file so that we get some size and code coverage metrics in order that the sonarqube dashboard will show the charts that fail to render if the size and code coverage indications are missing. This was working quite happily previously and is now broken in 3.4.3, also having the side effect failing the automated builds running on our build server. It may seem like a nice change to make, but the change in behavior means that we have to either special case these jars manually, or revert to the previous version and never update the plugin EDIT: Just noticed you have already pushed a fix to master. We will just wait for the release. |
@h3xstream |
We also have this issue, there are times when we want a scan but haven't built the code yet. |
@vara-prasad @rjbrandt As design, if you want to voluntary skip FindBugs analysis explicitly create a profile with no rule. #37 @pcuttle Yup. This edge case should be cover by. #36 I will post an update here when a release package is create. |
@h3xstream We are using multi module project and we use same profile for all the modules. |
We have the same problem as @pcuttle, everything was fine now the modules without java code fail our entire build. We do not consider this an edge case. |
We also have this error with a multi module project. |
#56 was create to add an optional option to skip the warnings. |
We are experiencing the same issue with sonarqube 5.6. We have the same profile for all projects and the fact is that our moultimodule project sometimes would not compile but anyway we want to analyse the source code by skipping somehow the bytecode analysis from findbugs. |
So what is the name of the option? |
I'm having a similar issue with sonar. I tried to get more logging information but using -X flags makes sonar not even parse projects. I noticed that the project that is making sonar plugin to fail is one that doesn't build any artifact. Could this be the issue?
|
The version 3.7.0 is available in a prerelease form : https://github.com/spotbugs/sonar-findbugs/releases/tag/3.7.0 (SonarQube GG https://groups.google.com/forum/#!topic/sonarqube/2DGGjoMfDSc) |
Sonar scan fails during findbugs execution in the case where there are java source files available and there are no class files available.
In some cases, the class files might be not be available and for this case, findbugs execution should be skipped and should not be failed.
Earlier in sonar-findbugs-plugin-3.2, findbugs execution gets skipped and now we are seeing the exception being raised and sonar scan fails.
Any specific reason on why the behaviour is changed ?
Can we skip the findbugs execution (fallback to old logic) instead of making the scan to fail.
The text was updated successfully, but these errors were encountered: