Search code examples
c++jenkinscontinuous-integrationcppcheck

Cppcheck into Jenkins with QT project


I have server with Jenkins and QT project. The server runs on CentOS 7. I installed "Cppcheck" into server also I installed "Cppcheck Plug-in" plugin into Jenkins.

The script for build project:

cd FlashClipboard;
/usr/lib64/qt5/bin/qmake FlashClipboard.pro;
make clean;
make;
cppcheck --enable=all --suppress=missingIncludeSystem . --xml --xml-version=2 . 2> ./tmp/cppcheck.xml;

Post-Build Actions:

enter image description here

But I have error:

[Cppcheck] Starting the cppcheck analysis.

[Cppcheck] Processing 1 files with the pattern 'tmp/cppcheck.xml'.

[Cppcheck] Parsing throws exceptions. javax.xml.bind.UnmarshalException - with linked exception:

[org.xml.sax.SAXParseException; systemId: file:/var/lib/jenkins/workspace/Flash%20Clipboard/tmp/cppcheck.xml; lineNumber: 1; columnNumber: 1; Premature end of file.]

Build step 'Publish Cppcheck results' changed build result to FAILURE

Build step 'Publish Cppcheck results' marked build as failure

What is my mistake?


Solution

  • sorry but are you sure the path is correct?

    Shouldn't it be:

    Cppcheck report XML:  FlashClipboard/tmp/cppcheck.xml