通过QT项目将Cppcheck导入Jenkins [英] Cppcheck into Jenkins with QT project

查看:99
本文介绍了通过QT项目将Cppcheck导入Jenkins的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有Jenkins和QT项目的服务器.该服务器在CentOS 7上运行.我在服务器中安装了" Cppcheck ",还在Jenkins中安装了" Cppcheck插件"插件.

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.

用于构建项目的脚本:

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;

构建后操作:

但是我有错误:

[Cppcheck]开始进行cppcheck分析.

[Cppcheck] Starting the cppcheck analysis.

[Cppcheck]以'tmp/cppcheck.xml'模式处理1个文件.

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

[Cppcheck]解析引发异常.javax.xml.bind.UnmarshalException-带有链接的例外情况:

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

[org.xml.sax.SAXParseException;systemId:文件:/var/lib/jenkins/workspace/Flash%20Clipboard/tmp/cppcheck.xml;lineNumber:1;columnNumber:1;文件过早结束.]

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

构建步骤发布Cppcheck结果"将构建结果更改为失败"

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

构建步骤发布Cppcheck结果"将构建标记为失败

Build step 'Publish Cppcheck results' marked build as failure

我怎么了?

推荐答案

对不起,但是您确定路径正确吗?

sorry but are you sure the path is correct?

应该不是:

Cppcheck report XML:  FlashClipboard/tmp/cppcheck.xml

这篇关于通过QT项目将Cppcheck导入Jenkins的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆