I have to add this rule to perform a static analysis.
The rule is the MISRA C RULE 9.
"Comments shall not be nested".
Can someone help me?
The rule is not listed.
there are already some existing rules in C/C++test, which check if there are nested comments in C/C++ code. Please, look in C/C++test at the rules like COMMENT-11, COMMENT-12, MISRA2004-2_3 or MISRA2012-RULE-3_1. They should help you.
@mzwawa Thank you so much!
Since you've been so kind, I'd ask you for help with this rule too:
"Switch statements shall not be nested".
Maybe this rule is also listed but I just can't find it!
Unfortunately, I cannot find this rule in C/C++test. However, there is a similar rule MISRA2004-15_1 ('A switch label shall only be used when the most closely-enclosing compound statement is the body of a switch statement').
@mzwawa Yes!!!! Thank you so much!