#This script is designed to run with Understand - CodeCheck #Rule 2-7-1 The character sequence /* shall not be used within a C-style comment. use base qw(Understand::Codecheck); use strict; use constant ERR1 => 'Violation: /* found inside C-style comment:' . "\n/*%1*/"; sub register_tr_text { my $check = shift; $check->add_tr_text(ERR1); } sub name { '2-7-1 The character sequence /* shall not be used within a C-style comment' } sub description { '2-7-1 (Required) The character sequence /* shall not be used within a C-style comment.' } sub detailed_description { <<'END_DESC'
Rationale
C++ does not support the nesting of C-style comments even though some compilers support this as a non-portable
language extension. A comment beginning with /* continues until the first */ is encountered. Any /* occurring
inside a comment is a violation of this rule.