mirror of
https://github.com/github/codeql.git
synced 2026-04-29 18:55:14 +02:00
JS: Consider empty regexp to be obviously empty
This commit is contained in:
@@ -83,10 +83,10 @@ function nonWordBoundary(x) {
|
||||
}
|
||||
|
||||
function emptyRegex(x) {
|
||||
return new RegExp("").test(x); // NOT OK
|
||||
return new RegExp("").test(x); // OK
|
||||
}
|
||||
|
||||
function parserTest(x) {
|
||||
/(\w\s*:\s*[^:}]+|#){|@import[^\n]+(?:url|,)/.test(x); // OK
|
||||
/^((?:a{0,2}|-)|\w\{\d,\d\})+X$/.text(x); // ok
|
||||
}
|
||||
/^((?:a{0,2}|-)|\w\{\d,\d\})+X$/.text(x); // ok
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user