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

Check that buffer is correctly accessed in WHERE clause

Open stefandrissen opened this issue 2 years ago • 1 comments
trafficstars

I activated this rule today, it seems to be checking the underlying table and not the actual buffer being used:

block-level on error undo, throw.

define buffer customer for customer.
define buffer bucustomer for customer.

find first customer no-lock no-error.
for each bucustomer
   where bucustomer.custnum > 0
   and   customer.custnum > 0
no-lock:
   // false positive on buffer usage customer.custnum > 0
end.

stefandrissen avatar Oct 10 '23 09:10 stefandrissen

Reproduced. Investigating root cause.

gquerret avatar Oct 12 '23 12:10 gquerret