2019-03-06 02:13:47 +08:00
|
|
|
// Copyright: (C) 2019 Intel Corporation
|
|
|
|
// SPDX-License-Identifier: Apache-2.0
|
|
|
|
|
|
|
|
virtual report
|
|
|
|
|
|
|
|
@r_idlen@
|
|
|
|
type T;
|
|
|
|
identifier I;
|
|
|
|
constant C;
|
|
|
|
position p;
|
|
|
|
@@
|
|
|
|
|
|
|
|
(
|
|
|
|
T I@p (...);
|
|
|
|
|
|
|
|
|
I@p (...)
|
|
|
|
|
|
|
|
|
T I@p = C;
|
|
|
|
|
|
|
|
|
T I@p;
|
|
|
|
)
|
|
|
|
|
|
|
|
@script:python depends on report@
|
|
|
|
id << r_idlen.I;
|
|
|
|
pos << r_idlen.p;
|
|
|
|
@@
|
|
|
|
|
|
|
|
if (len(id) > 31):
|
2021-03-25 00:33:49 +08:00
|
|
|
msg="WARNING: Violation to rule 5.1 or 5.2 (Identifiers shall be distinct) %s length %d > 31" % (id, len(id))
|
2019-03-06 02:13:47 +08:00
|
|
|
coccilib.report.print_report(pos[0], msg)
|