FindBugs shows only the first error in the method (Jenkins, IntelliJ IDEA)

I am using Jenkins with the FindBugs plugin installed for static code analysis. In addition, each developer in the team has the FindBugs IntelliJ IDEA plugin installed, which does the same.

The problem is that only the first occurrence of an error in a method is reported in Jenkins. In Idea, all problems are reported as single errors. For instance:

public String myMethod() { StringBuilder sb = new StringBuilder(); sb.append(String.format("First \n")); sb.append(String.format("Second \n")); sb.append(String.format("Third \n")); sb.append(String.format("Fourth \n")); return sb.toString(); } 

in this method, Idea reports 4 errors of type VA_FORMAT_STRING_USES_NEWLINE. On the jenkins server, in fact, there is only one error in the line with the line First \n .

Is there a way to configure Jenkins or Idea to behave evenly?

Versions:

  • IntelliJ Idea Enterprise 12.1.3
  • FindBugs-IDEA 0.9.97 plugin
  • Jenkins 1.513
  • Jenkins findbugs plugin 2.0.2
+6
source share
1 answer

The only solution I have found so far is to use another plugin, for example. QAPlug Findbugs . This report gives the results exactly the same as Jenkins.

The downside is a bit more awkward than the FindBugs-IDEA plugin.

0
source

Source: https://habr.com/ru/post/946516/


All Articles