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

Data displayed in Jenkins, do not correspond exactly to the data in checkstyle-result

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Component/s: checkstyle-plugin
    • Labels:
      None
    • Similar Issues:

      Description

      I would like to consult you in reference to the checkstyle Plugin for Jenkins.
      We currently use the plugin in our organization, we use version 3.35, on a Jenkins version 1.480.

      The point is that we have detected that the data displayed in the report showing Jenkins, do not correspond exactly to the data in the file generated by Checkstyle(checkstyle-result.xml).
      We have counted the number of error tags '<error>' and sometimes there are more than the shown by Jenkins checkstyle plugin.

      Is there any known problem?

      I hope you have understood me.
      Thank you for your time and effort.

        Attachments

          Activity

          Hide
          drulli Ulli Hafner added a comment -

          Can you please attach such a checkstyle file? My plug-in removes duplicates from the result.

          Show
          drulli Ulli Hafner added a comment - Can you please attach such a checkstyle file? My plug-in removes duplicates from the result.
          Hide
          scuencag Sergio Cuenca added a comment -

          I have attached the file. There are 58 errors in total, but Jenkins checkstyle report says that there are only 54.
          Thanks!!

          Show
          scuencag Sergio Cuenca added a comment - I have attached the file. There are 58 errors in total, but Jenkins checkstyle report says that there are only 54. Thanks!!
          Hide
          scuencag Sergio Cuenca added a comment -

          Do you consider that those three bugs are the same, because they are in the same line and are of the same type?
          <error line="105" column="37" severity="warning" message="'2' es un número mágico." source="com.puppycrawl.tools.checkstyle.checks.coding.MagicNumberCheck"/>
          <error line="105" column="42" severity="warning" message="'3' es un número mágico." source="com.puppycrawl.tools.checkstyle.checks.coding.MagicNumberCheck"/>
          <error line="105" column="47" severity="warning" message="'4' es un número mágico." source="com.puppycrawl.tools.checkstyle.checks.coding.MagicNumberCheck"/>

          Or those two? Because are exactly the same bugs but in different lines.
          <error line="103" column="44" severity="warning" message="'2' es un número mágico." source="com.puppycrawl.tools.checkstyle.checks.coding.MagicNumberCheck"/>
          <error line="105" column="37" severity="warning" message="'2' es un número mágico." source="com.puppycrawl.tools.checkstyle.checks.coding.MagicNumberCheck"/>

          I think that all of them are different bugs.

          Thank you Ulli.

          Show
          scuencag Sergio Cuenca added a comment - Do you consider that those three bugs are the same, because they are in the same line and are of the same type? <error line="105" column="37" severity="warning" message="'2' es un número mágico." source="com.puppycrawl.tools.checkstyle.checks.coding.MagicNumberCheck"/> <error line="105" column="42" severity="warning" message="'3' es un número mágico." source="com.puppycrawl.tools.checkstyle.checks.coding.MagicNumberCheck"/> <error line="105" column="47" severity="warning" message="'4' es un número mágico." source="com.puppycrawl.tools.checkstyle.checks.coding.MagicNumberCheck"/> Or those two? Because are exactly the same bugs but in different lines. <error line="103" column="44" severity="warning" message="'2' es un número mágico." source="com.puppycrawl.tools.checkstyle.checks.coding.MagicNumberCheck"/> <error line="105" column="37" severity="warning" message="'2' es un número mágico." source="com.puppycrawl.tools.checkstyle.checks.coding.MagicNumberCheck"/> I think that all of them are different bugs. Thank you Ulli.
          Hide
          drulli Ulli Hafner added a comment -

          Thanks! Indeed, I did not include the column number when parsing the file.

          Can I check-in your results file in GitHub and use it as unit test or is there any confidential information in it?

          Show
          drulli Ulli Hafner added a comment - Thanks! Indeed, I did not include the column number when parsing the file. Can I check-in your results file in GitHub and use it as unit test or is there any confidential information in it?
          Hide
          scuencag Sergio Cuenca added a comment -

          You can use it in the unit test. There is no confidential information.
          Thank you for your attention Ulli!

          Show
          scuencag Sergio Cuenca added a comment - You can use it in the unit test. There is no confidential information. Thank you for your attention Ulli!
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Ulli Hafner
          Path:
          pom.xml
          src/main/java/hudson/plugins/checkstyle/parser/CheckStyleParser.java
          src/main/java/hudson/plugins/checkstyle/parser/Error.java
          src/test/java/hudson/plugins/checkstyle/parser/CheckStyleParserTest.java
          src/test/resources/hudson/plugins/checkstyle/parser/issue19122.xml
          http://jenkins-ci.org/commit/checkstyle-plugin/eb83c5056b802b33ef8894063a4fb216f948d471
          Log:
          [FIXED JENKINS-19122] Parse and set column of Checkstyle warnings.

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Ulli Hafner Path: pom.xml src/main/java/hudson/plugins/checkstyle/parser/CheckStyleParser.java src/main/java/hudson/plugins/checkstyle/parser/Error.java src/test/java/hudson/plugins/checkstyle/parser/CheckStyleParserTest.java src/test/resources/hudson/plugins/checkstyle/parser/issue19122.xml http://jenkins-ci.org/commit/checkstyle-plugin/eb83c5056b802b33ef8894063a4fb216f948d471 Log: [FIXED JENKINS-19122] Parse and set column of Checkstyle warnings.

            People

            • Assignee:
              drulli Ulli Hafner
              Reporter:
              scuencag Sergio Cuenca
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: