LC0069 - StefanMaron/BusinessCentral.LinterCop GitHub Wiki
Empty statements should be avoided or should have a leading or trailing comment explaining their use.
This rule detects and flags empty statement expressions (excess semicolons) for improved readability and cleaner code.
Example
local procedure Example(SomeVar: Boolean)
begin
if SomeVar then begin
; <<-- this excess semicolon should be removed
Message('hello');
Message('world');
end;
; <<-- same here
end;
Leading or trailing comment
case EnumValue of
SomeEnum::First:
Message('Whatever');
SomeEnum:Second:
Message('Some message.');
else
; // No other scenarios needs a message
end;
In some cases, an empty statement makes sense, and adding a comment justifying its existence will suppress the rule.