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

PMD Plugin reporting existing warnings as new


    • Icon: Bug Bug
    • Resolution: Not A Defect
    • Icon: Major Major
    • pmd-plugin
    • Jenkins 1.474
      Jenkins Violations Plugin 0.7.10
      PMD Plugin 3.29
      Static analysis utilities 1.43
      Static analysis collector plugin 1.29

      Using the PMD plugin to detect and monitor PMD warnings that are found in my builds. I recently upgraded to PMD 5.0 and added a number of new PMD rules to my report.

      The problem is that the PMD plugin seems to be almost completely incapable of differentiating between new and previously found PMD warnings.

      For example, I got this from a recent build:
      PMD: 1,306 warnings from one analysis.

      1,304 new warnings
      1,305 fixed warnings

      Comparison between a warning entry generated by PMD 5.0 and the PMD plugin.

      <violation beginline="29" endline="29" begincolumn="31" endcolumn="84" rule="LoggerIsNotStaticFinal" ruleset="Java Logging" package="com.dbconfig.app" class="BackupDatabase" variable="logger" externalInfoUrl="http://pmd.sourceforge.net/rules/java/logging-java.html#LoggerIsNotStaticFinal" priority="2">
      The Logger variable declaration does not contain the static and final modifiers

      <message>The Logger variable declaration does not contain the static and final modifiers.</message>
      <moduleName reference="../../bug[20]/moduleName"/>
      <packageName reference="../../bug[31]/packageName"/>
      <category>Java Logging</category>

      The job is freestyle (gradle), using ant task to run the PMD.

            drulli Ulli Hafner
            david_resnick David Resnick
            0 Vote for this issue
            5 Start watching this issue