mirror of
https://github.com/github/codeql.git
synced 2026-07-12 23:15:40 +02:00
19 lines
504 B
Plaintext
19 lines
504 B
Plaintext
import python
|
|
|
|
/** Whether `mox` or `.StubOutWithMock()` is used in thin module `m`.
|
|
*/
|
|
predicate useOfMoxInModule(Module m) {
|
|
exists(ModuleObject mox |
|
|
mox.getName() = "mox" or mox.getName() = "mox3.mox" |
|
|
exists(ControlFlowNode use |
|
|
use.refersTo(mox) and
|
|
use.getScope().getEnclosingModule() = m
|
|
)
|
|
)
|
|
or
|
|
exists(Call call|
|
|
call.getFunc().(Attribute).getName() = "StubOutWithMock" and
|
|
call.getEnclosingModule() = m
|
|
)
|
|
}
|