Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-27890

Static analysis plugins don't show all warnings when used with maven project type

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • analysis-core-plugin
    • None
    • Jenkins -- 1.599
      Static Analysis Collector Plug-in -- 1.43
      Static Analysis Utilities -- 1.71
      FindBugs Plugin -- 4.60

      It appears that FindBugs report does not always properly indicate New and Fixed warnings. In fact, it almost never lists New and Fixed warnings as New or Fixed, which renders it virtually useless. Maybe the problem is that my project is multi-module, yet I still don't know why the report counts the total number of the warnings correctly, but then randomly discards some of them when reporting New, Fixed or Details.

      I created a small example made of scraps of real project, which indicates the problem fully. I attached the project together with compiled classes and XMLs created by FindBugs and PMD. From these XMLs it's clear that FindBugs itself indicated all warnings properly - however, FindBugs report plugin displayed some of them incorrectly:

      1. In build #4 FindBugs report displays 7 warnings in total, but displays only 6 of them when I request the list of them.
      2. In build #5, where I fixed two warnings, FindBugs report correctly tells me that the number or issues has reduced to 5. However, according to the report, there are no fixed warnings, but there is one new (that's just the one that was missed in the last build).

      In build #5 I also fixed a couple of PMD warnings, and they were counted and displayed correctly.

      I'm not sure whether it's a FindBugs plugin or Analysis Collector plugin that is wrong. All versions appear to be the latest available.

        1. 4-findbugs-warnings.xml
          9 kB
        2. 5-findbugs-warnings.xml
          7 kB
        3. FindBugs-after.png
          FindBugs-after.png
          76 kB
        4. FindBugs-before.png
          FindBugs-before.png
          71 kB
        5. FindBugs-Issue.zip
          131 kB
        6. PMD-after.png
          PMD-after.png
          66 kB
        7. PMD-before.png
          PMD-before.png
          75 kB

            drulli Ulli Hafner
            myx_ostankin Vlad Nikiforov
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: