mirror of
https://github.com/github/codeql.git
synced 2025-12-21 19:26:31 +01:00
Merge remote-tracking branch 'upstream/rc/1.23' into mergeback-20191202
Conflicts solved: javascript/extractor/src/com/semmle/js/extractor/Main.java javascript/ql/test/query-tests/Statements/UseOfReturnlessFunction/tst.js
This commit is contained in:
@@ -162,12 +162,11 @@ private predicate moduleInFile(Module m, File f) { m.getFile() = f }
|
||||
* ```
|
||||
*/
|
||||
class Require extends CallExpr, Import {
|
||||
cached
|
||||
Require() {
|
||||
exists(RequireVariable req |
|
||||
this.getCallee() = req.getAnAccess() and
|
||||
// `mjs` files explicitly disallow `require`
|
||||
not getFile().getExtension() = "mjs"
|
||||
)
|
||||
any(RequireVariable req).getAnAccess() = getCallee() and
|
||||
// `mjs` files explicitly disallow `require`
|
||||
not getFile().getExtension() = "mjs"
|
||||
}
|
||||
|
||||
override PathExpr getImportedPath() { result = getArgument(0) }
|
||||
|
||||
Reference in New Issue
Block a user