JS: simplify loop detection

This commit is contained in:
Esben Sparre Andreasen
2020-06-12 14:56:08 +02:00
parent 2d2468463b
commit 678bb7c128

View File

@@ -76,6 +76,6 @@ where
dangerous instanceof RegExpGroup
) and
// don't flag replace operations in a loop
not replace.getReceiver() = replace.getASuccessor+()
not replace.getReceiver().getALocalSource() = replace
select replace, "The replaced string may still contain a substring that starts matching at $@.",
dangerous, dangerous.toString()