
+1
Planned
Enhancement suggestion for "Empty <anything>" rules (W501, W502, W505, W506)
In some cases it is desired to have an empty else, except, ... block.
The suggestion is to relax the rule under certain conditions. One condition would be that the empty block contains a comment, which hopefully explains why the block is empty.
Visually this could look like the following:
with the above setting for the following code example:
Fixinsight would not warn about the empty exception, but warn about the empty finally block
The suggestion is to relax the rule under certain conditions. One condition would be that the empty block contains a comment, which hopefully explains why the block is empty.
Visually this could look like the following:
(X) W501 Empty EXCEPT block
(X) Accept comments
(X) W502 Empty FINALLY block
( ) Accept comments
with the above setting for the following code example:
procedure yeah(something, crazy:integer);
begin
try
try
something := crazy div 0;
except
// we can safely swallow the exceptions here
end;
finally
// nothing to clean up
end;
end;
Fixinsight would not warn about the empty exception, but warn about the empty finally block
Customer support service by UserEcho
// nothing to do
or
// intenionally left empty
or maybe something FixInsight specific
// FixInsight: IgnoreEmpty
This would allow us to mark some particular blocks as intentionally empty while not generally disabling the warning.