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

CppCheck plugin cannot handle empty files

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Component/s: cppcheck-plugin
    • Labels:
      None

      Description

      I am running cppcheck automatically on various modules of a project, and so the output xml files are in a folder something like "cppcheck-results/*.xml"

      Once in a while, one of these modules will have only header files, and so cppcheck's xml output is empty (the xml file is blank). However, the cppcheck plugin does not know how to handle an empty file, and errors out. Can we add something to ignore these files instead of causing an error?

        Activity

        Hide
        gbois Gregory Boissinot added a comment -

        Could you tell me is your empty file is just an empty file or a cppcheck result file with no errors such as:
        <?xml version="1.0"?>
        <results>
        </results>

        Show
        gbois Gregory Boissinot added a comment - Could you tell me is your empty file is just an empty file or a cppcheck result file with no errors such as: <?xml version="1.0"?> <results> </results>
        Hide
        khushsk Sagar Khushalani added a comment -

        It is just an empty file, completely blank.

        Show
        khushsk Sagar Khushalani added a comment - It is just an empty file, completely blank.
        Hide
        scm_issue_link SCM/JIRA link daemon added a comment -

        Code changed in jenkins
        User: Gregory Boissinot
        Path:
        pom.xml
        src/main/java/com/thalesgroup/hudson/plugins/cppcheck/CppcheckParserResult.java
        src/main/java/com/thalesgroup/hudson/plugins/cppcheck/CppcheckPublisher.java
        src/main/java/com/thalesgroup/hudson/plugins/cppcheck/config/CppcheckConfig.java
        src/main/resources/com/thalesgroup/hudson/plugins/cppcheck/CppcheckPublisher/config.jelly
        src/test/java/com/thalesgroup/hudson/plugins/cppcheck/CppcheckParserResultTest.java
        http://jenkins-ci.org/commit/cppcheck-plugin/931af5b4def7e112b517c55e0e1853863bc9d3cb
        Log:
        Fixed JENKINS-9726

        Show
        scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Gregory Boissinot Path: pom.xml src/main/java/com/thalesgroup/hudson/plugins/cppcheck/CppcheckParserResult.java src/main/java/com/thalesgroup/hudson/plugins/cppcheck/CppcheckPublisher.java src/main/java/com/thalesgroup/hudson/plugins/cppcheck/config/CppcheckConfig.java src/main/resources/com/thalesgroup/hudson/plugins/cppcheck/CppcheckPublisher/config.jelly src/test/java/com/thalesgroup/hudson/plugins/cppcheck/CppcheckParserResultTest.java http://jenkins-ci.org/commit/cppcheck-plugin/931af5b4def7e112b517c55e0e1853863bc9d3cb Log: Fixed JENKINS-9726
        Hide
        mixalturek Michal Turek added a comment -

        Closing.

        Show
        mixalturek Michal Turek added a comment - Closing.

          People

          • Assignee:
            gbois Gregory Boissinot
            Reporter:
            khushsk Sagar Khushalani
          • Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: