Run a code analysis

Coverity Documentation

Version
latest

As a first step in setting up Compliance Filtering, you should run an analysis of your codebase. Doing so populates the Coverity Analysis intermediate directory with findings data. You must run it using the --strip-path option. Failure to do so will result in an error when you attempt to generate a findings report.

  1. Run cov-analyze using the --strip-path option on your codebase, for example:

    On Linux: cov-analyze --dir idir --strip-path `pwd` --coding-standard-config config-file.json

    On Windows: cov-analyze --dir idir --strip-path %cd% --coding-standard-config config-file.json

    The `pwd` or %cd% returns the current working directory (which is then stripped out). Your goal in using the --strip-path option is to strip directories out of the path that are build-host dependent. You want to leave the directories that come from the code base.

    Refer to the Coverity Command Reference for more information on using cov-analyze.