Python: Autoformat

This commit is contained in:
Taus
2021-08-18 14:27:54 +00:00
committed by GitHub
parent af91a2df00
commit 021e5ff510

View File

@@ -11,7 +11,8 @@ import semmle.python.RegexTreeView
* For javascript we make the pragmatic performance optimization to ignore files we did not extract.
*/
predicate isExcluded(RegExpParent parent) {
not exists(parent.getRegex().getLocation().getFile().getRelativePath()) or
not exists(parent.getRegex().getLocation().getFile().getRelativePath())
or
// Regexes with many occurrences of ".*" may cause the polynomial ReDoS computation to explode, so
// we explicitly exclude these.
count(int i | exists(parent.getRegex().getText().regexpFind("\\.\\*", i, _)) | i) > 10