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
Findbugs Analysis should be skipped when there are no Findbugs Rules activated in QualityProfile #72
Comments
Having the same exact issue with plugin 3.4.4 we just updated Friday and Sonar 5.6.3 |
We have the same issue! |
I have some déjà-vu impression on this one. The current implementation verify that At least one rule is activate from FindBugs, FindSecBugs, FB-Contrib or the JSP repository. @Override
public void execute(SensorContext context) {
if(!hasActiveFindbugsRules() && !hasActiveFbContribRules() && !hasActiveFindSecBugsRules() && !hasActiveFindSecBugsJspRules()){
return;
} Can you guys make sure that both Java and JSP default or selected profile does not contain a FindBugs rules. |
Maybe it has to do with the project being set up as multi module, but for me it does not work. Relevant Parts of the log see below (full log attached, as well as screens from the quality profile)
|
We have a Quality Profile only with one rule (squid:S1451) and the scan fails with:
|
I just did some more testing around this issue. findbugs 3.4.4 fails when you don't set the property sonar.language so the workaround is to specifically set the language, this means that Findbugs 3.4.4 will not work for multi language projects unless you add a sonar-project.properties in all directories. this needs to be fixed for us to be able to upgrade the plugin. Here is the error without the language set.
|
Hi,
|
Please propose your fix via PR! :) |
Concerning my previous comment I have executed some additional debugging. The plugin activation is caused by default JSP QProfile rules.
It seems that it will not be so easy to be fixed. But I found a workaround that works 😸
That's all for now. 😄 |
change to |
… Findbugs analysis (defaults to enabled)
Having the same exact issue with plugin 4.0.3 we just updated Friday and Sonar 8.9.1 |
@magaofei the issue is most likely that the FindBugs JSP quality profile is your default profile for JSP So the workaround is to have a default JSP profile that does not contain any Findbugs rules. |
The fix for this issue is released here: https://github.com/spotbugs/sonar-findbugs/releases/tag/4.0.6 |
Version 4.0.6 has been released in the SonarQube marketplace so please consider upgrading to get the fix for this issue |
Just yesterday, we try to update our findbug plugin to 4.0.6 and today we see this error into jenkins jobs:
Some idea to resolve? |
SpotBugs needs the compiled .class files to analyze the project, this error message indicates that it could not find them. |
This issue should be fixed in version >= 4.0.6 |
Currently (Findbugs Plugin 3.4.4, Sonar 5.6) as soon as the Findbugs Plugin is installed the plugin is loaded and executed for every project no matter if findbugs rules are activated in the used quality profile.
Imho the execution should be skipped when no rules are included.
The text was updated successfully, but these errors were encountered: