• Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • pmd-plugin, warnings-plugin
    • Jenkins v. 1.554.2
      PMD Plugin v. 3.38.
      Static Code Analysis Plugins v. 1.58

      Hello.
      I've got a problem with computing new warnings functional.
      When I add a new PMD rule to my ruleset, I get odd results.
      Test case:

      1. Start the first build.
        See summary and full results.
      2. Add a new PMD rule to rule set and start the second build.
        Rule 'LongVariable' was added. The summary contains only 192 new warnings instead of 267 (==3126-2859).
        Moreover, full result contains 267 warning for new 'LongVariable' rule (match against first result).
      3. Go to job configuration, check 'Use delta for new warnings' check box and start the third build.
        The result changed.
        The summary contains both 192 and 267 new warnings on the same page.
        Besides, link '267 new warnings' opens a page with 192 new warnings.
        I suppose that the number of new warning should always be 267 in the example.

        1. new_build_1_sum.png
          new_build_1_sum.png
          6 kB
        2. new_build_2_new.png
          new_build_2_new.png
          4 kB
        3. new_build_2_sum.png
          new_build_2_sum.png
          6 kB
        4. new_build_3_new.png
          new_build_3_new.png
          4 kB
        5. new_build_3_sum.png
          new_build_3_sum.png
          6 kB
        6. tc_1_log.png
          tc_1_log.png
          13 kB
        7. tc_2_log.png
          tc_2_log.png
          14 kB
        8. tc_3_log.png
          tc_3_log.png
          14 kB
        9. build_1_full.png
          build_1_full.png
          56 kB
        10. build_1_sum.png
          build_1_sum.png
          6 kB
        11. build_2_full.png
          build_2_full.png
          57 kB
        12. build_2_sum.png
          build_2_sum.png
          7 kB
        13. build_3_full.png
          build_3_full.png
          57 kB
        14. build_3_sum.png
          build_3_sum.png
          7 kB

          [JENKINS-24873] Wrong number of new warnings

          Sergey Ryazantsev created issue -
          Sergey Ryazantsev made changes -
          Description Original: ello.
          I've got a problem with computing new warnings functional.
          When I add a new PMD rule to my ruleset, I get odd results.
          Test case:
          # Start the first build.
            See [summary|^build_1_sum.png] and [full|^build_1_full.png] results.
          # Add a new PMD rule to rule set and start the second build.
            Rule 'LongVariable' was added. The [summary|^build_2_sum.png] contains only 192 new warnings instead of 267 (==[3126|^build_2_sum.png]-[2859|^build_1_sum.png]).
            Moreover, [full|^build_2_full.png] result contains 267 warning for new 'LongVariable' rule (match against [first result|^build_1_full.png]).
          # Go to job configuration, check 'Use delta for new warnings' check box and start the third build.
            The result changed.
            The [summary|^build_3_sum.png] contains both 192 and 267 new warnings on the same page.
            Besides, link '267 new warnings' opens a page with 192 new warnings.
          I suppose that the number of new warning should always be 267 in the example.
          New: Hello.
          I've got a problem with computing new warnings functional.
          When I add a new PMD rule to my ruleset, I get odd results.
          Test case:
          # Start the first build.
            See [summary|^build_1_sum.png] and [full|^build_1_full.png] results.
          # Add a new PMD rule to rule set and start the second build.
            Rule 'LongVariable' was added. The [summary|^build_2_sum.png] contains only 192 new warnings instead of 267 (==[3126|^build_2_sum.png]-[2859|^build_1_sum.png]).
            Moreover, [full|^build_2_full.png] result contains 267 warning for new 'LongVariable' rule (match against [first result|^build_1_full.png]).
          # Go to job configuration, check 'Use delta for new warnings' check box and start the third build.
            The result changed.
            The [summary|^build_3_sum.png] contains both 192 and 267 new warnings on the same page.
            Besides, link '267 new warnings' opens a page with 192 new warnings.
          I suppose that the number of new warning should always be 267 in the example.
          Sergey Ryazantsev made changes -
          Environment Original: Jenkins v. 1.554.2
          PMD Plugin v. 3.38.
          Analysis Collector Plugin v. 1.58
          New: Jenkins v. 1.554.2
          PMD Plugin v. 3.38.
          Static Code Analysis Plugins v. 1.58

          Ulli Hafner added a comment -

          I see. Seems that some new warnings have the same properties and are therefore marked as duplicates.

          Ulli Hafner added a comment - I see. Seems that some new warnings have the same properties and are therefore marked as duplicates.
          Ulli Hafner made changes -
          Link New: This issue is related to JENKINS-6675 [ JENKINS-6675 ]

          Sergey Ryazantsev added a comment - - edited

          Hello, Ulli.
          What kind of properties are you talking about?

          Sergey Ryazantsev added a comment - - edited Hello, Ulli. What kind of properties are you talking about?

          Ulli Hafner added a comment -

          Same type, filename, line, ... Currently all warnings are collected in a set which does not contain duplicates.

          Ulli Hafner added a comment - Same type, filename, line, ... Currently all warnings are collected in a set which does not contain duplicates.

          Code changed in jenkins
          User: Ulli Hafner
          Path:
          src/main/java/hudson/plugins/analysis/core/FilesParser.java
          src/main/java/hudson/plugins/analysis/core/ParserResult.java
          http://jenkins-ci.org/commit/analysis-core-plugin/1d1eb5b17cc4fa21043fe8332599b66ab1e17334
          Log:
          Merge pull request #21 from sschuberth/master

          Fix checking for duplicate annotations. (Maybe related to JENKINS-24873).

          Compare: https://github.com/jenkinsci/analysis-core-plugin/compare/a5cae3ab9dfd...1d1eb5b17cc4

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Ulli Hafner Path: src/main/java/hudson/plugins/analysis/core/FilesParser.java src/main/java/hudson/plugins/analysis/core/ParserResult.java http://jenkins-ci.org/commit/analysis-core-plugin/1d1eb5b17cc4fa21043fe8332599b66ab1e17334 Log: Merge pull request #21 from sschuberth/master Fix checking for duplicate annotations. (Maybe related to JENKINS-24873 ). Compare: https://github.com/jenkinsci/analysis-core-plugin/compare/a5cae3ab9dfd...1d1eb5b17cc4

          Ulli Hafner added a comment -

          Do you have some warnings in the same line and column?

          Ulli Hafner added a comment - Do you have some warnings in the same line and column?

          Yes, I have.

          Sergey Ryazantsev added a comment - Yes, I have.

            drulli Ulli Hafner
            xpyctnc Sergey Ryazantsev
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: