mirror of
https://github.com/github/codeql.git
synced 2025-12-22 19:56:32 +01:00
Merge pull request #1042 from markshannon/python-ignore-dead-objects
Python: Ignore dead entities from library trap files.
This commit is contained in:
@@ -10,6 +10,13 @@ private cached predicate is_an_object(@py_object obj) {
|
|||||||
exists(@py_cobject mod_type | py_special_objects(mod_type, "ModuleType") and py_cobjecttypes(obj, mod_type)) and
|
exists(@py_cobject mod_type | py_special_objects(mod_type, "ModuleType") and py_cobjecttypes(obj, mod_type)) and
|
||||||
exists(Module m | py_cobjectnames(obj, m.getName()))
|
exists(Module m | py_cobjectnames(obj, m.getName()))
|
||||||
)
|
)
|
||||||
|
and (
|
||||||
|
/* Exclude unmatched builtin objects in the library trap files */
|
||||||
|
obj instanceof ControlFlowNode or
|
||||||
|
py_cobjectnames(obj, _) or
|
||||||
|
py_cobjecttypes(obj, _) or
|
||||||
|
py_special_objects(obj, _)
|
||||||
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Instances of this class represent objects in the Python program. However, since
|
/** Instances of this class represent objects in the Python program. However, since
|
||||||
|
|||||||
Reference in New Issue
Block a user