sonar-openedge
sonar-openedge copied to clipboard
Variable is assigned but never read not triggered when variable only assigns itself
Environment: SonarLint for Eclipse 3.6.1008
def var foo as int.
foo = foo - 1.
Nothing is actually using foo, so the 'variable is assigned but never read' rule should be flagging it, ie an assignment of a variable to itself should not count as "reading" it.
Right, the engine currently doesn't take into account this case.