mirror of
https://github.com/github/codeql.git
synced 2025-12-24 12:46:34 +01:00
Merge pull request #10298 from aibaars/suppress-require
Ruby: exclude 'require' and 'require_relative' definitions from call graph
This commit is contained in:
@@ -137,7 +137,14 @@ private module Cached {
|
||||
}
|
||||
|
||||
cached
|
||||
Method lookupMethod(Module m, string name) { TMethod(result) = lookupMethodOrConst(m, name) }
|
||||
Method lookupMethod(Module m, string name) {
|
||||
// The syntax_suggest library redefines Kernel.require/require_relative.
|
||||
// Somehow this causes performance issues on ruby/ruby. As a workaround
|
||||
// we exclude 'require' and 'require_relative'.
|
||||
// TODO: find the actual cause of the slowdown and fix things properly.
|
||||
not name = ["require", "require_relative"] and
|
||||
TMethod(result) = lookupMethodOrConst(m, name)
|
||||
}
|
||||
|
||||
cached
|
||||
Expr lookupConst(Module m, string name) {
|
||||
|
||||
Reference in New Issue
Block a user