Yes Evgeny, you can update the description of SONARPLUGINS-1813 by the following:
The object of the 'with' statement can have properties that collide with local variables, which can drastically change the meaning of the program. For instance:
with (foo) {
var x = 3;
return x;
}
, the local variable x could be clobbered by a property of foo - and perhaps it even has a setter, in which case assigning 3 could cause lots of other code to execute.
Therefore, 'with' statement should never be used. Instead, the previous code should be refactored to make direct calls to the object (<code>foo.x</code> in the previous example).
What's more, using the 'with' statement would produce an error in JavaScript strict mode code.
Probably we should update WithStatementCheck (
SONARPLUGINS-1813), which was implemented in version 1.0, to clearly specify that usage of with-statement not allowed in strict mode.