Closed cegekaJG closed 3 days ago
I agree that this is very commonly used.
However, as a code reviewer I would probably still wonder why you did not do something along those lines:
if not SalesHeader.FindFirst() then
Clear(SalesHeader);
if not SalesHeader.FindFirst() then
exit;
if not SalesHeader.FindFirst() then
// Maybe create new record
So the rule stays valid in my opinition, asking you to add a comment to explain why exaclty you need this type of if
syntax.
LC0069
currently triggers on if-statements that are immediately terminated with a semicolon. For example:This is a very common method to capture output and avoid unwanted errors, so this shouldn't count as a violation.