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

Wrong parsing of CppCheck results

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • warnings-ng-plugin
    • None
    • warnings-ng 4.0.0, analysis-model-api 3.0.0

      The Warnings Next Generation Plugin count each error location as error, instead of just counting error.

      Example (Shortened result of CppCheck 1.86 on PCL)

      <error id="redundantAssignment" severity="style" msg="Variable &apos;it&apos; is reassigned a value before the old one has been used." verbose="Variable &apos;it&apos; is reassigned a value before the old one has been used." cwe="563">
      	<location file0="apps\cloud_composer\src\point_selectors\rectangular_frustum_selector.cpp" file="apps\cloud_composer\src\point_selectors\rectangular_frustum_selector.cpp" line="53"/>
      	<location file0="apps\cloud_composer\src\point_selectors\rectangular_frustum_selector.cpp" file="apps\cloud_composer\src\point_selectors\rectangular_frustum_selector.cpp" line="51"/>
      	<symbol>it</symbol>
      </error>
      <error id="knownConditionTrueFalse" severity="style" msg="Condition &apos;rc&apos; is always true" verbose="Condition &apos;rc&apos; is always true" cwe="571">
      	<location file0="surface\src\3rdparty\opennurbs\opennurbs_brep_tools.cpp" file="surface\src\3rdparty\opennurbs\opennurbs_brep_tools.cpp" line="346" info="Condition &apos;rc&apos; is always true"/>
      	<location file0="surface\src\3rdparty\opennurbs\opennurbs_brep_tools.cpp" file="surface\src\3rdparty\opennurbs\opennurbs_brep_tools.cpp" line="335" info="Assignment &apos;rc=true&apos;, assigned value is 1"/>
      </error>
      

      This is currently counted as 4 errors instead of 2. CppCheck just gives multiple locations so dev can easily see the reason for this warning.

            drulli Ulli Hafner
            sunblack sunblack
            Votes:
            1 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: