<glossentry><glossterm>information</glossterm><glossdef><para>Enable information messages</para></glossdef></glossentry>
<glossentry><glossterm>unusedFunction</glossterm><glossdef><para>Check for unused functions. It is recommend to only
enable this when the whole program is scanned</para></glossdef></glossentry>
<glossentry><glossterm>missingInclude</glossterm><glossdef><para>Warn if there are missing includes</para></glossdef></glossentry>
</glosslist>
By default none of the additional checks are enabled. Several ids can be given if you separate them with commas, e.g. --enable=style,unusedFunction. See also --std
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<option>--error-exitcode=<n></option>
</term>
<listitem>
<para>If errors are found, integer <n> is returned instead of default 0.
EXIT_FAILURE is returned if arguments are not valid or if no input files are
provided. Note that your operating system can modify this value, e.g.
256 can become 0.</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<option>--errorlist</option>
</term>
<listitem>
<para>Print a list of all possible error messages in XML format.</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<option>--exitcode-suppress=<spec></option>
</term>
<listitem>
<para>Used to specify an error ID which should not result in a non-zero exitcode.</para>
<para>A file that contains a list of config-excludes.</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<option>--include=<file></option>
</term>
<listitem>
<para>Force inclusion of a file before the checked file. Can be used for example when checking the Linux kernel,
where autoconf.h needs to be included for every file compiled. Works the same way as the GCC -include option.</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<option>-i <dir></option>
</term>
<listitem>
<para>Give path to ignore. Give several -i parameters to ignore several paths. Give directory name or filename with path as parameter.
Directory name is matched to all parts of the path.</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<option>--inconclusive</option>
</term>
<listitem>
<para>Allow that Cppcheck reports even though the analysis is inconclusive.
There are false positives with this option. Each result must be carefully investigated before you know if it is good or bad.</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<option>--inline-suppr</option>
</term>
<listitem>
<para>Enable inline suppressions. Use them by placing comments in the form: // cppcheck-suppress memleak
before the line to suppress.</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<option>-j <jobs></option>
</term>
<listitem>
<para>Start <jobs> threads to do the checking work.</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<option>-l <load></option>
</term>
<listitem>
<para>Specifies that no new threads should be started if there are other threads running and the load average is at least
<load> (ignored on non UNIX-like systems)</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<option>--language=<language></option>
</term>
<listitem>
<para>Forces cppcheck to check all files as the given language. Valid
values are: c, c++</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<option>--library=<cfg></option>
</term>
<listitem>
<para>Use library configuration.</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<option>--max-configs=<limit></option>
</term>
<listitem>
<para>Maximum number of configurations to check in a file before skipping it. Default is 12. If used together with --force, the last option is
the one that is effective.</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<option>--max-ctu-depth=<limit></option>
</term>
<listitem>
<para>Maximum depth in whole program analysis. Default is 2.</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<option>--platform=<type></option>
</term>
<listitem>
<para>Specifies platform specific types and sizes.The available platforms are:
<glosslist>
<glossentry><glossterm>unix32</glossterm><glossdef><para>32 bit unix variant</para></glossdef></glossentry>
<glossentry><glossterm>unix64</glossterm><glossdef><para>64 bit unix variant</para></glossdef></glossentry>
<glossentry><glossterm>win32A</glossterm><glossdef><para>32 bit Windows ASCII character encoding</para></glossdef></glossentry>
<glossentry><glossterm>win32W</glossterm><glossdef><para>32 bit Windows UNICODE character encoding</para></glossdef></glossentry>
<glossentry><glossterm>win64</glossterm><glossdef><para>64 bit Windows</para></glossdef></glossentry>
</glosslist>
By default the platform which was used to compile Cppcheck is used.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<option>-q</option>
</term>
<term>
<option>--quiet</option>
</term>
<listitem>
<para>Only print something when there is an error.</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<option>-rp</option>
</term>
<term>
<option>-rp=<paths></option>
</term>
<term>
<option>--relative-paths;</option>
</term>
<term>
<option>--relative-paths=<paths></option>
</term>
<listitem>
<para>Use relative paths in output. When given, <paths> are used as base. You can separate multiple paths by ';'. Otherwise path where source files are searched is used. E.g. if given value is test, when checking test/test.cpp, the path in output will be test.cpp instead of test/test.cpp. The feature uses string comparison to create relative paths, so using e.g. ~ for home folder does not work. It is currently only possible to apply the base paths to files that are on a lower level in the directory tree.</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<option>--report-progress</option>
</term>
<listitem>
<para>Report progress when checking a file.</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<option>--report-type=<type></option>
</term>
<listitem>
<para>Add guideline and classification fields for specified coding standard. The available report types are:
<glosslist>
<glossentry><glossterm>normal</glossterm><glossdef><para>Default, only show cppcheck error ID and severity)</para></glossdef></glossentry>
<glossentry><glossterm>cert-c-2016</glossterm><glossdef><para>Cert C 2016</para></glossdef></glossentry>
<glossentry><glossterm>cert-cpp-2016</glossterm><glossdef><para>Cert C++ 2016</para></glossdef></glossentry>
<glossentry><glossterm>misra-c-2012</glossterm><glossdef><para>Misra C 2012</para></glossdef></glossentry>
<glossentry><glossterm>misra-c-2023</glossterm><glossdef><para>Misra C 2023</para></glossdef></glossentry>
<glossentry><glossterm>misra-c-2025</glossterm><glossdef><para>Misra C 2025</para></glossdef></glossentry>
<glossentry><glossterm>misra-cpp-2008</glossterm><glossdef><para>Misra C++ 2008</para></glossdef></glossentry>
<glossentry><glossterm>misra-cpp-2023</glossterm><glossdef><para>Misra C++ 2023</para></glossdef></glossentry>
</glosslist>
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<option>--rule=<rule></option>
</term>
<listitem>
<para>Match regular expression to create your own checks. E.g. rule "/ 0" can be used to check division by zero. This command is only available if cppcheck was compiled with HAVE_RULES=yes.</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<option>--rule-file=<file></option>
</term>
<listitem>
<para>Use given rule XML file. See https://sourceforge.net/projects/cppcheck/files/Articles/ for more info about the syntax. This command is only available if cppcheck was compiled with HAVE_RULES=yes.</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<option>--showtime=<mode></option>
</term>
<listitem>
<para>Show timing information. The available mode are:
<glossentry><glossterm>file</glossterm><glossdef><para>Show for each processed file</para></glossdef></glossentry>
<glossentry><glossterm>file-total</glossterm><glossdef><para>Show total time only for each processed file</para></glossdef></glossentry>
<glossentry><glossterm>summary</glossterm><glossdef><para>Show a summary at the end</para></glossdef></glossentry>
<glossentry><glossterm>top5_file</glossterm><glossdef><para>Show the top 5 for each processed file</para></glossdef></glossentry>
<glossentry><glossterm>top5_summary</glossterm><glossdef><para>Show the top 5 summary at the end</para></glossdef></glossentry>
</glosslist>
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<option>--std=<id></option>
</term>
<listitem>
<para>Set standard. The available options are:
<glosslist>
<glossentry><glossterm>c89</glossterm><glossdef><para>C code is C89 compatible</para></glossdef></glossentry>
<glossentry><glossterm>c99</glossterm><glossdef><para>C code is C99 compatible</para></glossdef></glossentry>
<glossentry><glossterm>c11</glossterm><glossdef><para>C code is C11 compatible (default)</para></glossdef></glossentry>
<glossentry><glossterm>c++03</glossterm><glossdef><para>C++ code is C++03 compatible</para></glossdef></glossentry>
<glossentry><glossterm>c++11</glossterm><glossdef><para>C++ code is C++11 compatible</para></glossdef></glossentry>
<glossentry><glossterm>c++14</glossterm><glossdef><para>C++ code is C++14 compatible</para></glossdef></glossentry>
<glossentry><glossterm>c++17</glossterm><glossdef><para>C++ code is C++17 compatible</para></glossdef></glossentry>
<glossentry><glossterm>c++20</glossterm><glossdef><para>C++ code is C++20 compatible (default)</para></glossdef></glossentry>
</glosslist>
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<option>--suppress=<spec></option>
</term>
<listitem>
<para>Suppress a specific warning. The format of <spec> is: [error id]:[filename]:[line].
The [filename] and [line] are optional.
[error id] may be * to suppress all warnings (for a specified file or files).
[filename] may contain the wildcard characters * or ?.</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<option>--suppressions-list=<file></option>
</term>
<listitem>
<para>Suppress warnings listed in the file.
Each suppression is in the format of <spec> above.</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<option>--suppress-xml=<.xml file></option>
</term>
<listitem>
<para>Use suppressions defined in xml as described in the manual</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<option>--template='<text>'</option>
</term>
<listitem>
<para>Format the error messages. E.g. '{file}:{line},{severity},{id},{message}' or '{file}({line}):({severity}) {message}'. Pre-defined templates: gcc, vs</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<option>-v</option>
</term>
<term>
<option>--verbose</option>
</term>
<listitem>
<para>More detailed error reports</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<option>--version</option>
</term>
<listitem>
<para>Print out version information</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<option>--xml</option>
</term>
<listitem>
<para>Write results in XML to error stream</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<option>--xml-version=<version></option>
</term>
<listitem>
<para>Select the XML file version. Also implies --xml. Currently only version 2 is available. The default version is 2.</para>
</listitem>
</varlistentry>
</variablelist>
</refsect1>
<refsect1id="author">
<title>AUTHOR</title>
<para>The program was written by Daniel Marjamäki and Cppcheck team. See AUTHORS file for list of team members.</para>
</refsect1>
<refsect1id="see_also">
<title>SEE ALSO</title>
<!-- In alphabetical order. -->
<para>Full list of features: https://sourceforge.net/p/cppcheck/wiki/Home/</para>