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

Duplicates in warnings plugin report

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • warnings-plugin
    • None
    • Platform: All, OS: All

    Description

      I have one job that compiles the Java source 3 different times, one of them
      after instrumentation with clover. Each deprecation warning is counted three times.

      Extracts from the console output are pasted below for one warning. While the
      warning generating with clover might be more difficult to attach to the original
      code and I could probably tweak the build process to remove them, the first and
      third warnings are identical and could be merged.

      The clover warning also is not able to link to the source code in the detail tab
      as the source path starts with /tmp/clover[...].

      Let me know if you need more data from the log.

      Xavier

      [javac]
      /home/hudson/workspace/jobs/PMD-snapshot/workspace/pmd/src/net/sourceforge/pmd/ant/PMDTask.java:248:
      warning: [deprecation] render(java.io.Writer,net.sourceforge.pmd.Report) in
      net.sourceforge.pmd.renderers.Renderer has been deprecated
      [javac] public void render(Writer writer, Report r) {}
      [javac] ^
      ...
      [javac] /tmp/clover60419.tmp/net/sourceforge/pmd/ant/PMDTask.java:248:
      warning: [deprecation] render(java.io.Writer,net.sourceforge.pmd.Report) in
      net.sourceforge.pmd.renderers.Renderer has been deprecated
      [javac] public void render(Writer writer, Report r)
      {__CLR2_3_2rm9rm9fknlwssd.R.E[35916]++;}
      [javac] ^
      ...
      [javac]
      /home/hudson/workspace/jobs/PMD-snapshot/workspace/pmd/src/net/sourceforge/pmd/ant/PMDTask.java:248:
      warning: [deprecation] render(java.io.Writer,net.sourceforge.pmd.Report) in
      net.sourceforge.pmd.renderers.Renderer has been deprecated
      [javac] public void render(Writer writer, Report r) {}
      [javac] ^

      Attachments

        Activity

          xlv xlv added a comment -

          Thanks for the fixes. I've tested the SNAPSHOT version and the only problem left
          is related to the clover output but I agree that's something I'll have to fix on
          my side.

          xlv xlv added a comment - Thanks for the fixes. I've tested the SNAPSHOT version and the only problem left is related to the clover output but I agree that's something I'll have to fix on my side.
          drulli Ulli Hafner added a comment -

          Note that the total number of warning in your first case is 18 (and not 20),
          since clover produces two warnings with the same filename as javac.

          drulli Ulli Hafner added a comment - Note that the total number of warning in your first case is 18 (and not 20), since clover produces two warnings with the same filename as javac.

          Code changed in hudson
          User: : drulli
          Path:
          trunk/hudson/plugins/checkstyle/src/main/java/hudson/plugins/checkstyle/util/ParserResult.java
          trunk/hudson/plugins/findbugs/src/main/java/hudson/plugins/findbugs/util/ParserResult.java
          trunk/hudson/plugins/pmd/src/main/java/hudson/plugins/pmd/util/ParserResult.java
          trunk/hudson/plugins/tasks/src/main/java/hudson/plugins/tasks/util/ParserResult.java
          trunk/hudson/plugins/warnings/src/main/java/hudson/plugins/warnings/util/ParserResult.java
          trunk/hudson/plugins/warnings/src/test/java/hudson/plugins/warnings/parser/AntJavacParserTest.java
          trunk/hudson/plugins/warnings/src/test/resources/hudson/plugins/warnings/parser/issue2316.txt
          http://fisheye4.cenqua.com/changelog/hudson/?cs=12060
          Log:
          [FIXED JENKINS-2316] Don't increment severity counter if the annotation is already part of the result.

          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in hudson User: : drulli Path: trunk/hudson/plugins/checkstyle/src/main/java/hudson/plugins/checkstyle/util/ParserResult.java trunk/hudson/plugins/findbugs/src/main/java/hudson/plugins/findbugs/util/ParserResult.java trunk/hudson/plugins/pmd/src/main/java/hudson/plugins/pmd/util/ParserResult.java trunk/hudson/plugins/tasks/src/main/java/hudson/plugins/tasks/util/ParserResult.java trunk/hudson/plugins/warnings/src/main/java/hudson/plugins/warnings/util/ParserResult.java trunk/hudson/plugins/warnings/src/test/java/hudson/plugins/warnings/parser/AntJavacParserTest.java trunk/hudson/plugins/warnings/src/test/resources/hudson/plugins/warnings/parser/issue2316.txt http://fisheye4.cenqua.com/changelog/hudson/?cs=12060 Log: [FIXED JENKINS-2316] Don't increment severity counter if the annotation is already part of the result.
          xlv xlv added a comment -

          I've updated the plugin and there are some weird issues with the warning count.

          See http://hudson.brittanysoftware.com/job/PMD/136/warningsResult/

          All Warnings 18
          Total 18 Normal priority 20

          This test has 10 javac warnings followed by 10 similar ones with the clover
          instrumentation. I was expecting all numbers to be 20.

          See also http://hudson.brittanysoftware.com/job/PMD-snapshot/57/warningsResult/

          All Warnings 18
          Total 18 Normal priority 30

          This one has 10 javac warnings, 10 clover warnings and the same 10 javac
          warnings again. All numbers should also be 20 here.

          xlv xlv added a comment - I've updated the plugin and there are some weird issues with the warning count. See http://hudson.brittanysoftware.com/job/PMD/136/warningsResult/ All Warnings 18 Total 18 Normal priority 20 This test has 10 javac warnings followed by 10 similar ones with the clover instrumentation. I was expecting all numbers to be 20. See also http://hudson.brittanysoftware.com/job/PMD-snapshot/57/warningsResult/ All Warnings 18 Total 18 Normal priority 30 This one has 10 javac warnings, 10 clover warnings and the same 10 javac warnings again. All numbers should also be 20 here.
          drulli Ulli Hafner added a comment -

          I'm collecting warnings now in a set.

          That has a side effect: if the two identical warnings appear in the same line
          but different column, then now only one warning is reported. (This should be no
          big problem since there is no visualization of columns yet...)

          drulli Ulli Hafner added a comment - I'm collecting warnings now in a set. That has a side effect: if the two identical warnings appear in the same line but different column, then now only one warning is reported. (This should be no big problem since there is no visualization of columns yet...)

          Code changed in hudson
          User: : drulli
          Path:
          trunk/hudson/plugins/checkstyle/src/main/java/hudson/plugins/checkstyle/util/ParserResult.java
          trunk/hudson/plugins/findbugs/src/main/java/hudson/plugins/findbugs/util/ParserResult.java
          trunk/hudson/plugins/pmd/src/main/java/hudson/plugins/pmd/util/ParserResult.java
          trunk/hudson/plugins/tasks/src/main/java/hudson/plugins/tasks/util/ParserResult.java
          trunk/hudson/plugins/warnings/src/main/java/hudson/plugins/warnings/util/ParserResult.java
          trunk/hudson/plugins/warnings/src/test/java/hudson/plugins/warnings/parser/ParserRegistryTest.java
          trunk/hudson/plugins/warnings/src/test/resources/hudson/plugins/warnings/parser/all.txt
          http://fisheye4.cenqua.com/changelog/hudson/?cs=11995
          Log:
          [FIXED JENKINS-2316] Use a set rather than a list to collect the warnings.

          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in hudson User: : drulli Path: trunk/hudson/plugins/checkstyle/src/main/java/hudson/plugins/checkstyle/util/ParserResult.java trunk/hudson/plugins/findbugs/src/main/java/hudson/plugins/findbugs/util/ParserResult.java trunk/hudson/plugins/pmd/src/main/java/hudson/plugins/pmd/util/ParserResult.java trunk/hudson/plugins/tasks/src/main/java/hudson/plugins/tasks/util/ParserResult.java trunk/hudson/plugins/warnings/src/main/java/hudson/plugins/warnings/util/ParserResult.java trunk/hudson/plugins/warnings/src/test/java/hudson/plugins/warnings/parser/ParserRegistryTest.java trunk/hudson/plugins/warnings/src/test/resources/hudson/plugins/warnings/parser/all.txt http://fisheye4.cenqua.com/changelog/hudson/?cs=11995 Log: [FIXED JENKINS-2316] Use a set rather than a list to collect the warnings.

          People

            drulli Ulli Hafner
            xlv xlv
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: