sonar-openedge icon indicating copy to clipboard operation
sonar-openedge copied to clipboard

Check that buffer is correctly accessed in WHERE clause rule

Open Ton-Pe opened this issue 1 year ago • 1 comments

Rule: BufferUsageInWhereClause Following find statement raises an issue: "WHERE clause does not have any reference to buffer ProdRes"

 FIND FIRST ProdOper OF ProdOrder WHERE
          CAN-FIND(FIRST ProdRes OF ProdOper WHERE  ProdRes.Qtyrep = YES).

Looks like that the rule does not recognize the OF statement that is used in the CAN-FIND part of the WHERE clause.

If I write the can-find without OF, issues is not raised

FIND FIRST ProdOper OF ProdOrder WHERE
          CAN-FIND(FIRST ProdRes WHERE ProdRes.PrOrderNum = ProdOper.PrOrderNum AND ProdRes.Qtyrep = YES).

Ton-Pe avatar May 28 '24 06:05 Ton-Pe

Thanks for the report, will be fixed !

gquerret avatar May 28 '24 18:05 gquerret

bug fixed in version 2.29.0 last year

cdelabriere avatar Nov 24 '25 16:11 cdelabriere