sonar-openedge
sonar-openedge copied to clipboard
Nested IF THEN ELSE without DO block
It would be a good idea to add a rule to track the following ambiguous code in imbricated IF THEN ELSE.
Exemple :
IF myLogical THEN IF myOtherLogical THEN RUN first.p. ELSE RUN second.p.
Even if for expert eyes it is obvious to know to which IF the ELSE is referring to, I think it is a good idea to avoid such code (even if it is properly indented).
Rule IfIndent should help. But the current implementation doesn't report anything with this indentation:
IF condition THEN
IF condition2 THEN
MESSAGE "1".
ELSE
MESSAGE "2".
While indentation is wrong.
Fixed as part of issue #1039