sonar-openedge
sonar-openedge copied to clipboard
WHOLE-INDEX on Temp-Table on FOR EACH <temp-table> with a join
On behalf of SMIT (reported some time ago)
It seems that I have found an issue, which is related to https://github.com/Riverside-Software/sonar-openedge/issues/116 and https://github.com/Riverside-Software/sonar-openedge/issues/100.
When there are two temp-tables joined, then Sonar still reports a simple FOR EACH
Code to reproduce:
DEFINE TEMP-TABLE ttTableOne NO-UNDO
FIELD tableId AS INTEGER
INDEX pk IS PRIMARY UNIQUE tableId.
DEFINE TEMP-TABLE ttTableTwo NO-UNDO
FIELD tableId AS INTEGER
FIELD tableOneId AS INTEGER
INDEX fk tableOneId.
FOR EACH ttTableOne:
/* just iterating */
END.
FOR EACH ttTableOne,
EACH ttTableTwo
WHERE ttTableTwo.tableOneId = ttTableOne.tableId:
/* just iterating */
END.
Only the second FOR EACH is reported by Sonar, not the first one:

The same issue is reported in the Sonar web report, so it is not just a SonarLint issue. We are using OpenEdge plugin 2.14.9.