manual: updated MISRA chapter. The rule texts cant be extracted directly from the PDF anymore.
This commit is contained in:
parent
c0272fc2ef
commit
b4924e59da
|
@ -756,15 +756,10 @@ gui/test.cpp,16,error,mismatchAllocDealloc,Mismatching allocation and deallocati
|
||||||
<para>Cppcheck has an addon that checks for <literal>MISRA</literal> C
|
<para>Cppcheck has an addon that checks for <literal>MISRA</literal> C
|
||||||
2012 compliance.</para>
|
2012 compliance.</para>
|
||||||
|
|
||||||
<para>It is not allowed to publish the <literal>MISRA</literal> rule
|
|
||||||
texts. Therefore the <literal>MISRA</literal> rule texts are not available
|
|
||||||
directly in the addon. Instead, the addon can read the rule texts either
|
|
||||||
from the <literal>Misra</literal> PDF file or from a text file.</para>
|
|
||||||
|
|
||||||
<section>
|
<section>
|
||||||
<title>Requirements</title>
|
<title>Requirements</title>
|
||||||
|
|
||||||
<para>The Cppcheck MISRA addon requires:</para>
|
<para>You need:</para>
|
||||||
|
|
||||||
<itemizedlist>
|
<itemizedlist>
|
||||||
<listitem>
|
<listitem>
|
||||||
|
@ -772,32 +767,31 @@ gui/test.cpp,16,error,mismatchAllocDealloc,Mismatching allocation and deallocati
|
||||||
</listitem>
|
</listitem>
|
||||||
|
|
||||||
<listitem>
|
<listitem>
|
||||||
<para><literal>For rule texts; MISRA</literal> PDF/Text file</para>
|
<para><literal>The MISRA C 2012</literal> PDF. You can buy this from
|
||||||
|
<uri>http://www.misra.org.uk</uri> (costs 15-20 pounds)</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
</itemizedlist>
|
</itemizedlist>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section>
|
|
||||||
<title>MISRA PDF</title>
|
|
||||||
|
|
||||||
<para>If you want your code to be <literal>MISRA</literal> compliant
|
|
||||||
then you probably have the <literal>MISRA</literal> PDF.</para>
|
|
||||||
|
|
||||||
<para>However the MISRA PDF can only be used directly by the addon if
|
|
||||||
the <literal>xpdf</literal> package is installed, it is a cross platform
|
|
||||||
open source package.</para>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
<section>
|
<section>
|
||||||
<title>MISRA Text file</title>
|
<title>MISRA Text file</title>
|
||||||
|
|
||||||
<para>If you have installed <literal>xpdf</literal>, this text file can
|
<para>It is not allowed to publish the <literal>MISRA</literal> rule
|
||||||
be easily generated on the command line (using
|
texts. Therefore the <literal>MISRA</literal> rule texts are not
|
||||||
<literal>pdftotext</literal> that is included in
|
available directly in the addon. Instead, the addon can read the rule
|
||||||
<literal>xpdf</literal>):</para>
|
texts from a text file. If you copy/paste all text in "Appendix A
|
||||||
|
Summary of guidelines" from the MISRA pdf, then you have all the rule
|
||||||
|
texts.</para>
|
||||||
|
|
||||||
|
<para>If you have installed <literal>xpdf</literal>, such text file can
|
||||||
|
be generated on the command line (using <literal>pdftotext</literal>
|
||||||
|
that is included in <literal>xpdf</literal>):</para>
|
||||||
|
|
||||||
<programlisting>pdftotext misra-c-2012.pdf output.txt</programlisting>
|
<programlisting>pdftotext misra-c-2012.pdf output.txt</programlisting>
|
||||||
|
|
||||||
|
<para>The output might not be 100% perfect so you might need to make
|
||||||
|
minor tweaks manually.</para>
|
||||||
|
|
||||||
<para>Other pdf-to-text utilities might work also.</para>
|
<para>Other pdf-to-text utilities might work also.</para>
|
||||||
|
|
||||||
<para>To create the text file manually, copy paste Appendix A "Summary
|
<para>To create the text file manually, copy paste Appendix A "Summary
|
||||||
|
@ -809,6 +803,9 @@ Rule text
|
||||||
Rule 1.2
|
Rule 1.2
|
||||||
Rule text
|
Rule text
|
||||||
...</programlisting>
|
...</programlisting>
|
||||||
|
|
||||||
|
<para>Rules that you want to disable does not need to have a rule text.
|
||||||
|
Rules that don't have rule text will be suppressed by the addon.</para>
|
||||||
</section>
|
</section>
|
||||||
</chapter>
|
</chapter>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue