BusinessCentral.LinterCop
BusinessCentral.LinterCop copied to clipboard
Add an exception for LC0069
I think I understand the intent of LC0069, but we get this in a few places where I would consider it a false positive
In our company, we do require an else
statement on all our case
statements (that could be a new rule? 😅). And if there are nothing to do in the else
part, we still require the else
with an empty statement together with a comment.
case EnumValue of
SomeEnum::First:
Message('Whatever);
SomeEnum:Second:
Message('Some message.');
else
; // No other scenarios needs a message
end;
I suggest that exceptions for LC0069 are added, so that an empty statement is allowed if it is commented. I now see that similar thoughts are included in the discussion that resulted in this rule (https://github.com/StefanMaron/BusinessCentral.LinterCop/discussions/716#discussioncomment-10197633)
Thoughts?