1 Star 0 Fork 0

aparece/codeql

加入 Gitee
与超过 1400万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
BackspaceEscape.ql 579 Bytes
一键复制 编辑 原始数据 按行查看 历史
Asger Feldthaus 提交于 2020-02-27 17:41 +08:00 . JS: Autoformat everything
/**
* @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" and
rece.isPartOfRegExpLiteral()
select rece, "Backspace escape in regular expression."
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/aparece/codeql.git
git@gitee.com:aparece/codeql.git
aparece
codeql
codeql
main

搜索帮助