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

cppcheck-plugin doesn't display the latest source when cppcheck-plugin is the cause of a build failure

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Component/s: cppcheck-plugin
    • Labels:
      None
    • Environment:
      CentOS 5.7 Jenkins 1.434
    • Similar Issues:

      Description

      The cppcheck plugin has a very confusing behaviour when it is configured to fail builds.

      Set up a project such that the project builds fine on its own, but has a cppcheck error in it.
      Configure the cppcheck-plugin threshold level to fail the build if there are more then 0 cppcheck "error" issues found.

      Run the build.

      Click on the cppcheck link.

      You'll get the message "This plugin will not report cppcheck result until there is at least one success or unstable build."

      You are prevented from seeing the cppcheck results which caused the failed build!

      This gets even more confusing when there have been successful builds in the past. The results that are displayed are for the last successful build, even though the cppcheck plugin is the source of the build failure. This makes the build look like the latest changes haven't been picked up because the old source code is displayed.

      Overall, this behaviour prevents you from seeing the source of the build failure, which is the latest cppcheck-plugin results. This makes it quite challenging to fix the source of the build failure because you can't see it from the the latest cppcheck build results. You have to drill into the specific build, then look at the cppcheck results.

      The plugin needs to see if the build failure was because of a build step, or if the cppcheck plugin failed the build because of a cppcheck-plugin threshold being exceeded.

      If the build failure is a result of the cppcheck-plugin threshold being exceeded, the cppcheck-plugin should show the latest cppcheck results so that the cppcheck failure can be investigated and corrected.

        Attachments

          Activity

          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Gregory Boissinot
          Path:
          src/main/java/org/jenkinsci/plugins/cppcheck/CppcheckProjectAction.java
          http://jenkins-ci.org/commit/cppcheck-plugin/7a5165bcdcbd212e3a6d48d98a5e13a9929c0aab
          Log:
          Fix JENKINS-12504

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Gregory Boissinot Path: src/main/java/org/jenkinsci/plugins/cppcheck/CppcheckProjectAction.java http://jenkins-ci.org/commit/cppcheck-plugin/7a5165bcdcbd212e3a6d48d98a5e13a9929c0aab Log: Fix JENKINS-12504
          Hide
          c_welch Chris Welch added a comment -

          This problem is still not fixed. We are still seeing old results making it difficult to fix the current problems and giving us confusing information.

          Show
          c_welch Chris Welch added a comment - This problem is still not fixed. We are still seeing old results making it difficult to fix the current problems and giving us confusing information.
          Hide
          c_welch Chris Welch added a comment -

          This problem is still not fixed (using plugin 1.9). We are still seeing old results from the last successful build when cppcheck fails the build.

          Very confusing.

          Show
          c_welch Chris Welch added a comment - This problem is still not fixed (using plugin 1.9). We are still seeing old results from the last successful build when cppcheck fails the build. Very confusing.
          Hide
          c_welch Chris Welch added a comment -

          My mistake, we had another error that was causing the failure. Issue is closed.

          Show
          c_welch Chris Welch added a comment - My mistake, we had another error that was causing the failure. Issue is closed.
          Hide
          mixalturek Michal Turek added a comment -

          Closing.

          Show
          mixalturek Michal Turek added a comment - Closing.

            People

            • Assignee:
              gbois Gregory Boissinot
              Reporter:
              c_welch Chris Welch
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: