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

Issue marked as new when the issue did exist in a previous build but on a different line

    • Icon: Improvement Improvement
    • Resolution: Duplicate
    • Icon: Minor Minor
    • warnings-ng-plugin
    • None

      We have an issue which existed for a while, which is logged as which shows the issue is 24 days old:

       

       

      In the next build, a change has been made to this file which moved this method to a new line, but the method remained unchanged. It is now logged as:

       

       

      Are the new issues identified by line number or the line of code? The latter would be better as it is not a new issue even though it has moved lines.

       

      This issue is a check style issue but this probably applies to all plugins.

          [JENKINS-58403] Issue marked as new when the issue did exist in a previous build but on a different line

          Ulli Hafner added a comment -

          The comparison is using a two pass algorithm: in the first pass the properties of the warning are compared. If one property differs (e.g., line number) then this warning is moved to a second pass. In the second pass, the actual code is compared. This is currently done by checking the context above and below the warning (5 lines). Did the content (or whitespace) in the surrounding lines change?

          Ulli Hafner added a comment - The comparison is using a two pass algorithm: in the first pass the properties of the warning are compared. If one property differs (e.g., line number) then this warning is moved to a second pass. In the second pass, the actual code is compared. This is currently done by checking the context above and below the warning (5 lines). Did the content (or whitespace) in the surrounding lines change?

          Julie Shamji added a comment -

          I can confirm that there were no whitespace changes on this line.

          There were new lines added within 5 lines of this change.

          Julie Shamji added a comment - I can confirm that there were no whitespace changes on this line. There were new lines added within 5 lines of this change.

          Ulli Hafner added a comment -

          I think I need to find some time to port https://github.com/jenkinsci/analysis-core-plugin/pull/49 to the new API.

          Ulli Hafner added a comment - I think I need to find some time to port https://github.com/jenkinsci/analysis-core-plugin/pull/49  to the new API.

            drulli Ulli Hafner
            julieshamji Julie Shamji
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: