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

Analysis collector marks some warnings as fixed even though they are not

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Labels:
      None
    • Environment:
      Jenkins core version: 1.410
      Static Code Analysis Plug-ins -- 1.38
      FindBugs Plugin -- 4.36
      Warnings Plugin-- 3.28
      Analysis Collector Plugin--- 1.19
    • Similar Issues:

      Description

      As mentioned over comment "https://wiki.jenkins-ci.org/display/JENKINS/Static+Code+Analysis+Plug-ins?focusedCommentId=60918774&#comment-60918774", the "Static Analysis Result" is showing wrong.
      We (at our company) are using Jenkins core version 1.410 and "Static Code Analysis Plug-ins" plugin installed is v1.38. Somehow the result overview is showing wrong. eg: Total warnings are 52, however in the details it shows as 40. Surprisingly, the difference 12 warnings went into fixed (even without any change of code).

        Attachments

        1. build_may21.xml
          8 kB
        2. compilerwarnings.JPG
          compilerwarnings.JPG
          95 kB
        3. failed_build.xml
          29 kB
        4. findbugsresult.JPG
          findbugsresult.JPG
          82 kB
        5. fixed_warnings_tab.JPG
          fixed_warnings_tab.JPG
          110 kB
        6. publisher_warnings_config_xml_part.txt
          2 kB
        7. reference_build.xml
          39 kB
        8. static_analysis_result_error.JPG
          static_analysis_result_error.JPG
          57 kB

          Activity

          Hide
          naveen_karnati naveen karnati added a comment -

          oops.. Attached config.xml rather than build.xml in my earlier post. sry.. Attached is the requested build.xml (both reference & failed).

          thanks

          Show
          naveen_karnati naveen karnati added a comment - oops.. Attached config.xml rather than build.xml in my earlier post. sry.. Attached is the requested build.xml (both reference & failed). thanks
          Hide
          drulli Ulli Hafner added a comment -

          Thanks for adding the files. I can see from these files that for the analysis collector part some warnings are detected as new, even though they are not. However, I still not see why this is the case. Would it be possible to also attach the 2 analysis.xml files of the build folder? Then I can try to write a unit test that reads these files. Somehow one property of a warning changed (filename, etc.).

          Show
          drulli Ulli Hafner added a comment - Thanks for adding the files. I can see from these files that for the analysis collector part some warnings are detected as new, even though they are not. However, I still not see why this is the case. Would it be possible to also attach the 2 analysis.xml files of the build folder? Then I can try to write a unit test that reads these files. Somehow one property of a warning changed (filename, etc.).
          Hide
          medianick Nick Jones added a comment -

          We're having the same issue here, only with free-form .NET (MSBuild) jobs. I get 1593 warnings (long story) with 112 new warnings and 112 fixed warnings in every build, even with no code changes. For what it's worth, the MSBuild Warnings reports 246 warnings with 244 new and 244 fixed, again for every build.

          Show
          medianick Nick Jones added a comment - We're having the same issue here, only with free-form .NET (MSBuild) jobs. I get 1593 warnings (long story) with 112 new warnings and 112 fixed warnings in every build, even with no code changes. For what it's worth, the MSBuild Warnings reports 246 warnings with 244 new and 244 fixed, again for every build.
          Hide
          drulli Ulli Hafner added a comment - - edited

          @Nick Jones: Nick I think your case is different. Here the original warnings computation is working correctly (warnigns and findbugs). Just the aggregation is broken. In your case the warnings computation already is broken. The reason might be that the conflicting files could not be found. Can you please create a separate issue?

          Show
          drulli Ulli Hafner added a comment - - edited @ Nick Jones : Nick I think your case is different. Here the original warnings computation is working correctly (warnigns and findbugs). Just the aggregation is broken. In your case the warnings computation already is broken. The reason might be that the conflicting files could not be found. Can you please create a separate issue?
          Hide
          drulli Ulli Hafner added a comment -

          Can you please check if the latest version works as expected? I fixed a bug in the equals method that was the reason for some differences in new and fixed warnings.

          Show
          drulli Ulli Hafner added a comment - Can you please check if the latest version works as expected? I fixed a bug in the equals method that was the reason for some differences in new and fixed warnings.

            People

            • Assignee:
              drulli Ulli Hafner
              Reporter:
              naveen_karnati naveen karnati
            • Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: