mirror of
https://github.com/github/codeql.git
synced 2026-05-03 04:39:29 +02:00
Python move various theXXX() predicates into the appropriate module.
This commit is contained in:
@@ -39,14 +39,14 @@ predicate maybe_defined_in_outer_scope(Name n) {
|
||||
}
|
||||
|
||||
Variable relevant_var(Name n) {
|
||||
n.getVariable() = result and
|
||||
(corresponding(n, _) or corresponding(_, n))
|
||||
n.getVariable() = result and
|
||||
(corresponding(n, _) or corresponding(_, n))
|
||||
}
|
||||
|
||||
predicate same_name(Name n1, Name n2) {
|
||||
corresponding(n1, n2) and
|
||||
relevant_var(n1) = relevant_var(n2) and
|
||||
not exists(builtin_object(n1.getId())) and
|
||||
not exists(Object::builtin(n1.getId())) and
|
||||
not maybe_defined_in_outer_scope(n2)
|
||||
}
|
||||
|
||||
|
||||
@@ -12,5 +12,5 @@
|
||||
import python
|
||||
|
||||
from CallNode call, string name
|
||||
where call.getFunction().refersTo(quitterObject(name))
|
||||
where call.getFunction().refersTo(Object::quitter(name))
|
||||
select call, "The '" + name + "' site.Quitter object may not exist if the 'site' module is not loaded or is modified."
|
||||
|
||||
Reference in New Issue
Block a user