Files
codeql/javascript/ql/src/Expressions/MisspelledVariableName.ql
2018-08-02 17:53:23 +01:00

20 lines
584 B
Plaintext

/**
* @name Misspelled variable name
* @description Misspelling a variable name implicitly introduces a global
* variable, which may not lead to a runtime error, but is
* likely to give wrong results.
* @kind problem
* @problem.severity warning
* @id js/misspelled-variable-name
* @tags maintainability
* readability
* correctness
* @precision very-high
*/
import Misspelling
from GlobalVarAccess gva, VarDecl lvd
where misspelledVariableName(gva, lvd)
select gva, "'" + gva + "' may be a typo for variable $@.", lvd, lvd.getName()