You can use the <prevent> tag (nested under the
<coverity> and <config> elements) to specify
directories and certain build options in the configuration file instead of specifying
them on the command line. Options that are specific to the build process reside under
the <emit_options> tag. Table 1 describes some common
configuration options and the equivalent command line option for each. If an option is
specified both on the command line to a command and also in
coverity_config.xml, the command line takes precedence.
| Tag | Description | Overriding command line option |
|---|---|---|
<tmp_dir>
|
The directory in which to place temporary files. |
|
<dir>
|
The top-level directory that Coverity Analysis uses to determine the emit and output directories. |
|
<parse_error_threshold> |
A child of the cov-build command to not return error code
8, and to not generate a warning. If less than this
percentage compiles, the cov-build command returns a
warning and the 8 error code. The default value is
95. |
parse-error-threshold <percentage> |
<preprocess_first> |
A child of the cov-build command tries to preprocess
each file with the native compiler before sending it to
cov-emit. This tag does not take a value. Use if
the build fails because of errors in cov-emit
preprocessing. |
preprocess-first |
<no_diff> |
A child of the |
no-diff |
<return_emit_failures> |
A child of the cov-build returns with an error code if an
emit failure occurs. The return value is a combination (a binary OR) of
the following flags:
cov-build always returns an error code
if your build fails. |
return-emit-failures |
<chase_symlinks>
|
A child of the cov-build and cov-translate
follow symbolic links when compiling files. For example, if you compile
a file called foo.c, which is a symbolic link to
the file bar.c, and foo.c has
an error in it, the error report lists bar.c if you
used this flag, otherwise foo.c. |
chase-symlinks |
<emit_cmd_line_id>
|
A child of the cov-build and option, see The 'cov-translate' command in place of the native compiler. cov-translate emit different files for the same
file built with different command-line options. By default, these
commands only emit a file the first time it is compiled. See Getting linkage information. This tag does not take a
value. |
emit-cmd-line-id |
The tags described in Table 1 require a matching closing tag.
For example, see Figure 1.
cov-analyze, only the following XML tags are supported:<tmp_dir><dir>
The following example modifies some common options.
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE coverity SYSTEM "coverity_config.dtd">
<coverity>
<!-- Version 1.0 -->
<cit_version>1</cit_version>
<config>
<prevent>
<tmp_dir>/home/users/tests/temp</tmp_dir>
<verbosity>2</verbosity>
<emit_options>
<emit_cmd_line_id/>
<force_emit/>
<return_emit_failures/>
<chase_symlinks/>
</emit_options>
</prevent>
</config>
</coverity>
tmp_dir/home/user/tmp/data/tmp_dir
Using line breaks (as shown in the following example) can create pathnames with unintended characters (such as carriage returns) or cause other problems.
tmp_dir/home/user/tmp/
data/tmp_dir