How do I ignore /usr/include in Coverity Scan?

余生颓废 提交于 2019-12-12 19:51:05

问题


I've set up a project to use Coverity Scan.

Under Analysis Settings→Project Components I have

Component name  Pattern              Ignore in analysis     
cxxopts         .*/src/cxxopts.hpp         Yes  
STL             /usr/include/c++/.*        Yes  

but still when I go to View defects I see 9 issues, all from files like /usr/include/c++/5.4.1/functional. How do I actually exclude them?


Confusingly, the Overview tab shows

12 Total defects
2 Outstanding
7 Dismissed
3 Fixed

even though View defects shows 9 issues (is that the 7+2? Why are some outstanding and some dismissed, when all should be ignored?)


回答1:


It looks like a regex pattern, in which case the "++" likely needs some form of escaping. I'm not sure which form, because I don't know how the strings are being interpreted or what kind of regex syntax is being used, but some variant of the following should work:

/usr/include/c\+\+/.*
/usr/include/c\\+\\+/.*
/usr/include/c\\\+\\\+/.*

If none of these work, I'd suggest contacting scan-admin@coverity.com (listed as the contact email for questions on the scan website).

This would also explain why the overview shows results from these files at all.



来源:https://stackoverflow.com/questions/46216894/how-do-i-ignore-usr-include-in-coverity-scan

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!