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

More dead code

Open stefandrissen opened this issue 3 years ago • 1 comments

While the compiler is able to flag:

return false.
message 'never executed'.

I just ran into (oversimplified):

if not lvalue then
   return false.

if not lvalue then
   message 'never executed'.

The variable is not changed between the two conditions, so the second half is dead code (or in my case an unintended bug).

I am not sure if this is within what could reasonably be achieved.

stefandrissen avatar Sep 15 '21 11:09 stefandrissen

A very simplified version of the execution tree has been created for the security rules, but it's far from complete. Improving it is on the roadmap (many rules would be possible with this execution tree), but I already know that some other enhancements have a higher priority, so the only thing I can tell is that it won't be available in the coming months.

gquerret avatar Sep 15 '21 13:09 gquerret