We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 84234d5 commit 52330e8Copy full SHA for 52330e8
3 files changed
javascript/ql/test/library-tests/RegExp/IsRegex/IsRegex.expected
@@ -0,0 +1,2 @@
1
+| tst.js:1:12:1:38 | '^http: ... le.com' | is a regular expression |
2
+| tst.js:4:37:4:43 | 'regex' | is a regular expression |
javascript/ql/test/library-tests/RegExp/IsRegex/IsRegex.ql
@@ -0,0 +1,4 @@
+import javascript
+
3
+from RegExpPatternSource regex
4
+select regex, "is a regular expression"
javascript/ql/test/library-tests/RegExp/IsRegex/tst.js
@@ -0,0 +1,6 @@
+new RegExp('^http://test\.example.com'); // NOT OK
+function detectRegexViaSplice(string) {
+ let found = getMyThing().search('regex'); // NOT OK
5
+ arr.splice(found, 1);
6
+};
0 commit comments