mirror of
https://github.com/github/codeql.git
synced 2025-12-18 09:43:15 +01:00
17 lines
508 B
Plaintext
17 lines
508 B
Plaintext
import csharp
|
|
private import semmle.code.csharp.commons.Util
|
|
|
|
query predicate global_stmt(Stmt stmt) { stmt.isGlobal() }
|
|
|
|
query predicate globalBlock(BlockStmt block, Method m, Parameter p, Type t) {
|
|
block.isGlobalStatementContainer() and
|
|
block.getEnclosingCallable() = m and
|
|
m.getDeclaringType() = t and
|
|
m.getAParameter() = p
|
|
}
|
|
|
|
query predicate methods(Method m, string entry) {
|
|
m.getFile().getStem() = "GlobalStmt" and
|
|
if m instanceof MainMethod then entry = "entry" else entry = "non-entry"
|
|
}
|