Skip to content

Commit b4924e5

Browse files
committed
manual: updated MISRA chapter. The rule texts cant be extracted directly from the PDF anymore.
1 parent c0272fc commit b4924e5

1 file changed

Lines changed: 19 additions & 22 deletions

File tree

man/manual.docbook

Lines changed: 19 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -756,48 +756,42 @@ gui/test.cpp,16,error,mismatchAllocDealloc,Mismatching allocation and deallocati
756756
<para>Cppcheck has an addon that checks for <literal>MISRA</literal> C
757757
2012 compliance.</para>
758758

759-
<para>It is not allowed to publish the <literal>MISRA</literal> rule
760-
texts. Therefore the <literal>MISRA</literal> rule texts are not available
761-
directly in the addon. Instead, the addon can read the rule texts either
762-
from the <literal>Misra</literal> PDF file or from a text file.</para>
763-
764759
<section>
765760
<title>Requirements</title>
766761

767-
<para>The Cppcheck MISRA addon requires:</para>
762+
<para>You need:</para>
768763

769764
<itemizedlist>
770765
<listitem>
771766
<para>Python 2.X or 3.X</para>
772767
</listitem>
773768

774769
<listitem>
775-
<para><literal>For rule texts; MISRA</literal> PDF/Text file</para>
770+
<para><literal>The MISRA C 2012</literal> PDF. You can buy this from
771+
<uri>http://www.misra.org.uk</uri> (costs 15-20 pounds)</para>
776772
</listitem>
777773
</itemizedlist>
778774
</section>
779775

780-
<section>
781-
<title>MISRA PDF</title>
782-
783-
<para>If you want your code to be <literal>MISRA</literal> compliant
784-
then you probably have the <literal>MISRA</literal> PDF.</para>
785-
786-
<para>However the MISRA PDF can only be used directly by the addon if
787-
the <literal>xpdf</literal> package is installed, it is a cross platform
788-
open source package.</para>
789-
</section>
790-
791776
<section>
792777
<title>MISRA Text file</title>
793778

794-
<para>If you have installed <literal>xpdf</literal>, this text file can
795-
be easily generated on the command line (using
796-
<literal>pdftotext</literal> that is included in
797-
<literal>xpdf</literal>):</para>
779+
<para>It is not allowed to publish the <literal>MISRA</literal> rule
780+
texts. Therefore the <literal>MISRA</literal> rule texts are not
781+
available directly in the addon. Instead, the addon can read the rule
782+
texts from a text file. If you copy/paste all text in "Appendix A
783+
Summary of guidelines" from the MISRA pdf, then you have all the rule
784+
texts.</para>
785+
786+
<para>If you have installed <literal>xpdf</literal>, such text file can
787+
be generated on the command line (using <literal>pdftotext</literal>
788+
that is included in <literal>xpdf</literal>):</para>
798789

799790
<programlisting>pdftotext misra-c-2012.pdf output.txt</programlisting>
800791

792+
<para>The output might not be 100% perfect so you might need to make
793+
minor tweaks manually.</para>
794+
801795
<para>Other pdf-to-text utilities might work also.</para>
802796

803797
<para>To create the text file manually, copy paste Appendix A "Summary
@@ -809,6 +803,9 @@ Rule text
809803
Rule 1.2
810804
Rule text
811805
...</programlisting>
806+
807+
<para>Rules that you want to disable does not need to have a rule text.
808+
Rules that don't have rule text will be suppressed by the addon.</para>
812809
</section>
813810
</chapter>
814811

0 commit comments

Comments
 (0)