cppcheck/gui/help/ch04.html

6 lines
2.5 KiB
HTML
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>Chapter 4. XML output</title><meta name="generator" content="DocBook XSL Stylesheets V1.75.1"><link rel="home" href="index.html" title="Cppcheck 1.44"><link rel="up" href="index.html" title="Cppcheck 1.44"><link rel="prev" href="ch03.html" title="Chapter 3. Preprocessor configurations"><link rel="next" href="ch05.html" title="Chapter 5. Reformatting the output"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 4. XML output</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ch03.html">Prev</a> </td><th width="60%" align="center"> </th><td width="20%" align="right"> <a accesskey="n" href="ch05.html">Next</a></td></tr></table><hr></div><div class="chapter" title="Chapter 4. XML output"><div class="titlepage"><div><div><h2 class="title"><a name="id2588463"></a>Chapter 4. XML output</h2></div></div></div><p>Cppcheck can generate the output in XML format.</p><p>Use the --xml flag when you execute cppcheck:</p><pre class="programlisting">cppcheck --xml file1.cpp</pre><p>The xml format is:</p><pre class="programlisting">&lt;?xml version="1.0"?&gt;
&lt;results&gt;
&lt;error file="file1.cpp" line="123" id="someError"
severity="error" msg="some error text"/&gt;
&lt;/results&gt;</pre><p>Attributes:</p><div class="variablelist"><dl><dt><span class="term">file</span></dt><dd><p>filename. Both relative and absolute paths are possible</p></dd><dt><span class="term">line</span></dt><dd><p>a number</p></dd><dt><span class="term">id</span></dt><dd><p>id of error. These are always valid symbolnames.</p></dd><dt><span class="term">severity</span></dt><dd><p>either error or style</p></dd><dt><span class="term">msg</span></dt><dd><p>the error message</p></dd></dl></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ch03.html">Prev</a> </td><td width="20%" align="center"> </td><td width="40%" align="right"> <a accesskey="n" href="ch05.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Chapter 3. Preprocessor configurations </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> Chapter 5. Reformatting the output</td></tr></table></div></body></html>