All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.sonar.l10n.flex.rules.flex.WithStatement.html Maven / Gradle / Ivy

There is a newer version: 2.14.0.5032
Show newest version

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