Skip to content

G-1070: Avoid nesting comment blocks.

Minor

Maintainability

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 (bad)

1
2
3
4
5
6
7
begin
   /* comment one -- nested comment two */
   null;
   -- comment three /* nested comment four */
   null;
end;
/

Example (good)

1
2
3
4
5
6
7
begin
   /* comment one, comment two */
   null;
   -- comment three, comment four
   null;
end;
/