Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/sorting/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Continuous integration cppcheck将xml写入输出文件并;“可以理解”;将结果发送到控制台_Continuous Integration_Command Line Interface_Static Analysis_Cppcheck - Fatal编程技术网

Continuous integration cppcheck将xml写入输出文件并;“可以理解”;将结果发送到控制台

Continuous integration cppcheck将xml写入输出文件并;“可以理解”;将结果发送到控制台,continuous-integration,command-line-interface,static-analysis,cppcheck,Continuous Integration,Command Line Interface,Static Analysis,Cppcheck,使用cppcheck(1.86-r0),以下内容将结果打印到xml文件中。但是,控制台输出保持完全为空 cppcheck--quiet--error exitcode=1--xml--xml version=2--output file=CPPCheckReport.xml--inline suppr--enable=warning./src 另外,指定模板(将--template=vs添加到上述命令中)不起作用,输出文件在此优先 我如何在控制台中存储xml(稍后我将介绍)并输出有意义的消息(为

使用cppcheck(1.86-r0),以下内容将结果打印到xml文件中。但是,控制台输出保持完全为空

cppcheck--quiet--error exitcode=1--xml--xml version=2--output file=CPPCheckReport.xml--inline suppr--enable=warning./src

另外,指定模板(将
--template=vs
添加到上述命令中)不起作用,输出文件在此优先


我如何在控制台中存储xml(稍后我将介绍)并输出有意义的消息(为了更好地理解我的CI工作,我需要使用控制台)?

我不相信
cppcheck
会这样做,但是您可以通过处理xml输出文件来获得有意义的消息。例如,类似这样的内容:

cppcheck --all-your-options-from-above
grep -E '<location ' CPPCheckReport.xml | sed 's/^ *//'
cppcheck——上面的所有选项

grep-E'@Daniel Marjamäki这目前可能吗?