@@ -816,7 +816,7 @@ Rule text
816816 these.</para >
817817
818818 <section >
819- <title >Suppressing a certain error type </title >
819+ <title >Plain text suppressions </title >
820820
821821 <para >You can suppress certain types of errors. The format for such a
822822 suppression is one of:</para >
@@ -869,6 +869,25 @@ uninitvar</programlisting>
869869 </section >
870870 </section >
871871
872+ <section >
873+ <title >XML suppressions</title >
874+
875+ <para >You can specify suppressions in a XML file. Example file:</para >
876+
877+ <programlisting >< ?xml version="1.0"?>
878+ < suppressions>
879+ < suppression>
880+ < id> uninitvar< /id>
881+ < fileName> src/file1.c< /fileName>
882+ < lineNumber> 10< /lineNumber>
883+ < symbolName> var< /symbolName>
884+ < /suppression>
885+ < /suppressions> </programlisting >
886+
887+ <para >The xml format is extensible and may be extended with further
888+ attributes in the future.</para >
889+ </section >
890+
872891 <section >
873892 <title >Inline suppressions</title >
874893
@@ -902,6 +921,17 @@ Checking test.c...
902921 No error is reported when invoking cppcheck this way:</para >
903922
904923 <programlisting >cppcheck --inline-suppr test.c</programlisting >
924+
925+ <para >you can specify that the inline suppression only applies to a
926+ specific symbol:</para >
927+
928+ <programlisting >// cppcheck-suppress arrayIndexOutOfBounds symbolName=arr</programlisting >
929+
930+ <para > You can write comments for the suppress, however is recommended
931+ to use ; or // to specify where they start:</para >
932+
933+ <programlisting >// cppcheck-suppress arrayIndexOutOfBounds ; some comment
934+ // cppcheck-suppress arrayIndexOutOfBounds // some comment</programlisting >
905935 </section >
906936 </chapter >
907937
0 commit comments