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

org.sonar.l10n.javascript.rules.javascript.RedeclaredVariable.html Maven / Gradle / Ivy

This rule checks that the var keyword is not used to declare a variable with a name that is already in use. It applies to already defined variables as well as to function parameters.

This use of duplicate name is often unwanted and can lead to bugs and more generally to confusing code :

var a = 'foo';
var a = 'bar'; // Non-Compliant

function f(e) {
  var e = "event"; // Non-Compliant
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy