问题
The defects discovered by coverity SA including errors of STLPort, Boost, Qt libs as well, Is there any way to exclude these errors while running cov-build or cov-analyze?
回答1:
There are several ways to exclude these libraries.
At the highest level, you can choose to exclude them during build or analysis and then there won't be any results for them in the UI, unfortunately that also means that you will not get as complete of a view of your own errors in your own code, since analysis does inter procedural examination of various interactions.
So instead you can do something that's easier. Go ahead, analyze all of the code including all the libraries, etc. but then set up components in the UI and create permissions on the components corresponding to "third party" source such that the users can see the source code (and can navigate to it) but cannot see the defects. This allows complete information in the UI for developers triaging defects in their own code without being distracted by defects in code they don't have control over.
来源:https://stackoverflow.com/questions/21883375/coverity-sa-excluding-boost-stlport-errors