I have recently added a new Jenkins job to my automation suite to run coverity analysis on a C++ application. The job uses svn to updade to latest code then uses coverity (cov-build, cov-analyze and cov-format-errors) and creates a text file of coverity errors. However the application has been around for a long time and has alot of coverity errors highlighted. i am looking for a way to run coverity so that it only analyses newly added content?? Does anyone know a way to achieve this? Also any other Coverity tips are very welcome :D

有帮助吗?

解决方案

You can't really do this. Coverity has no idea what is new code and what is not.

But there is a workaround. First, make run Coverity on your code, then mark ALL Coverity issues as Ignore and Intentional in the CIM server. Then, setup your Coverity Plugin to report only when NEW issues are found.

Now, when Coverity scans your code after a new code update, if any issues are found that do NOT match the existing baseline of issues, it will trigger a failure. NOTE: the failure will continue to trigger until you either modify code to make the issue disappear, or mark the new issue as other than New.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top