manual: some minor refactorings

This commit is contained in:
Daniel Marjamäki 2009-11-14 15:17:06 +01:00
parent 99c6d11c70
commit 91433587d2
1 changed files with 19 additions and 25 deletions

View File

@ -11,16 +11,10 @@
<chapter> <chapter>
<title>Introduction</title> <title>Introduction</title>
<para>Cppcheck is a static analysis tool for C/C++ code - it textually <para>Cppcheck is an analysis tool for C/C++ code. Unlike C/C++ compilers
inspects your C/C++ source code to detect bugs.</para> and many other analysis tools, we don't detect syntax errors. Cppcheck
only detects the types of bugs that the compilers normally fail to detect.
<para>Cppcheck detects issues that you will not find with your compiler. The goal is no false positives. </para>
But Cppcheck doesn't detect the types of bugs that compilers
detect.</para>
<para>It is our goal to generate no false positives. We always try to
achieve 0 false positives. There will always be issues that Cppcheck fail
to detect.</para>
<para>Supported platforms:</para> <para>Supported platforms:</para>
@ -92,24 +86,14 @@ Checking path/file2.cpp...
<literal><literal>Cppcheck</literal></literal> is sure there is an <literal><literal>Cppcheck</literal></literal> is sure there is an
error.</para> error.</para>
<para>When a likely issue is discovered, <literal>Cppcheck</literal> <para>When a likely issue is discovered <literal>Cppcheck</literal>
bails out without reporting this issue - to prevent false positives. But bails out without reporting this issue - to prevent false positives.
with <literal>--all</literal> you can ensure that these issues are When <literal>--all</literal> is given, these issues are
reported.</para> reported.</para>
<para>The <literal>--all</literal> flag is useful but makes <para>The <literal>--all</literal> flag is useful but makes
<literal>Cppcheck</literal> more unreliable:</para> <literal>Cppcheck</literal> more unreliable, you will probably get false
positives.</para>
<itemizedlist>
<listitem>
<para>You will probably get false positives</para>
</listitem>
<listitem>
<para>Cppcheck can detect issues that it can't detect by
default</para>
</listitem>
</itemizedlist>
<para>Here is a simple code example:</para> <para>Here is a simple code example:</para>
@ -176,6 +160,16 @@ Checking path/file2.cpp...
<programlisting>cppcheck --unused-functions path</programlisting> <programlisting>cppcheck --unused-functions path</programlisting>
</section> </section>
<section>
<title>Multithreaded checking</title>
<para>If you have a multicore processor, it is a good idea to use the
<literal>-j</literal> flag. To use 4 threads to check the files in a
folder:</para>
<programlisting>cppcheck -j 4 path</programlisting>
</section>
</chapter> </chapter>
<chapter> <chapter>