Files
codeql/javascript/ql/src/RegExp/BackspaceEscape.ql
Anders Schack-Mulligen e58094c732 Javascript: Autoformat.
2019-01-11 11:02:42 +01:00

19 lines
542 B
Plaintext

/**
* @name Backspace escape in regular expression
* @description Using '\b' to escape the backspace character in a regular expression is confusing
* since it could be mistaken for a word boundary assertion.
* @kind problem
* @problem.severity recommendation
* @id js/regex/backspace-escape
* @tags maintainability
* readability
* regular-expressions
* @precision medium
*/
import javascript
from RegExpCharEscape rece
where rece.toString() = "\\b"
select rece, "Backspace escape in regular expression."