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

Conflicting rules for static and dynamic finds

Open stefandrissen opened this issue 5 years ago • 2 comments

A static find without no-error:

find customer.

Triggers the findnoerror rule which warns that if no record can be found a run-time error will occur.

A dynamic find without no-error:

buffer customer:find-unique().

Does not trigger any rule, even though it, just like a static find, will also throw a run-time error if no record can be found. 'Normal' usage with no-error:

hb:find-unique() no-error.

Triggers the avoidnoerror rule. This applies to all dynamic buffer find methods.

So please sharpen the rules so that:

  1. the find-unique and find-first methods without no-error should trigger the findnoerror rule
  2. the find-unique and find-first methods should not trigger the avoidnoerror rule

stefandrissen avatar Apr 01 '20 14:04 stefandrissen

Will be included in next release

gquerret avatar Apr 02 '20 14:04 gquerret

I tried adding image to the exclude keywords but that does not help. Can this rule be updated

cverbiest avatar Mar 15 '22 10:03 cverbiest