org.sonar.l10n.flex.rules.flex.WithStatement.html Maven / Gradle / Ivy
Why is this an issue?
Never use with
statements, since they decrease readability. When you do not specify a variable’s scope, you do not always know where
you are setting properties, so your code can be confusing.
Noncompliant code example
with (foo) { // Noncompliant
return x; // is it a property of foo or local variable ?
}
Compliant solution
return foo.x;
© 2015 - 2025 Weber Informatics LLC | Privacy Policy