Skip to content

G-1010: Try to label your sub blocks.

Minor

Maintainability

Reason

It's a good alternative for comments to indicate the start and end of a named processing.

Example (bad)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
begin
   begin
      null;
   end;

   begin
      null;
   end;
end;
/

Example (good)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
begin
   <<prepare_data>>
   begin
      null;
   end prepare_data;

   <<process_data>>
   begin
      null;
   end process_data;
end good;
/