rules repository

G-1070

🆓
Warning

Avoid nesting comment blocks.

Reason

Having an end-of-comment within a block comment will end that block-comment. This does not only influence your code but is also very hard to read.

Example

Non-Compliant Example

begin
   /* comment one -- nested comment two */
   null;
   -- comment three /* nested comment four */
   null;
end;
/
Issues
LineColumnMessage
219Nested comment '-- nested comment two'.
421Nested comment /* nested comment four */.

Compliant Solution - ★★★★★

begin
   /* comment one, comment two */
   null;
   -- comment three, comment four
   null;
end;
/

References