使用 QT 项目 Cppcheck 进入 Jenkins
Cppcheck into Jenkins with QT project
我有带有 Jenkins 和 QT 项目的服务器。服务器在 CentOS 7 上运行。我在服务器中安装了“Cppcheck”,我也在 Jenkins 中安装了“Cppcheck Plug-in”插件。
构建项目的脚本:
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-构建操作:
但是我有错误:
[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
我的错误是什么?
抱歉,您确定路径正确吗?
不应该是:
Cppcheck report XML: FlashClipboard/tmp/cppcheck.xml
我有带有 Jenkins 和 QT 项目的服务器。服务器在 CentOS 7 上运行。我在服务器中安装了“Cppcheck”,我也在 Jenkins 中安装了“Cppcheck Plug-in”插件。
构建项目的脚本:
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-构建操作:
但是我有错误:
[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
我的错误是什么?
抱歉,您确定路径正确吗?
不应该是:
Cppcheck report XML: FlashClipboard/tmp/cppcheck.xml