Details
-
Type:
New Feature
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: JAVASCRIPT-1.2
-
Component/s: JavaScript
-
Labels:None
-
Number of attachments :
Description
Ref: JSC_REDECLARED_VARIABLE at https://developers.google.com/closure/compiler/docs/error-ref
Title
Avoid redeclaration of variables
Severity
Major
Description
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 }
Message
Rename variable '
{0}' as this name is already used.
Activated?
Yes
Cardinality
Single
Integration tests were updated.