scripts: coccinelle: Add guideline number on a script output

Add information about the guideline number in the script checking a
identifier length.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
This commit is contained in:
Flavio Ceolin 2021-03-24 09:33:49 -07:00 committed by Anas Nashif
parent 8552542f6e
commit a869da55c6

View file

@ -26,5 +26,5 @@ pos << r_idlen.p;
@@ @@
if (len(id) > 31): if (len(id) > 31):
msg="WARNING: Identifier %s length %d > 31" % (id, len(id)) msg="WARNING: Violation to rule 5.1 or 5.2 (Identifiers shall be distinct) %s length %d > 31" % (id, len(id))
coccilib.report.print_report(pos[0], msg) coccilib.report.print_report(pos[0], msg)