mirror of
https://github.com/github/codeql.git
synced 2026-05-02 12:15:17 +02:00
C#: Exclude delegate and dynamic calls from extractor telemetry
This commit is contained in:
@@ -120,7 +120,14 @@ module ReportStats<StatsSig Stats> {
|
||||
module CallTargetStats implements StatsSig {
|
||||
int getNumberOfOk() { result = count(Call c | exists(c.getTarget())) }
|
||||
|
||||
int getNumberOfNotOk() { result = count(Call c | not exists(c.getTarget())) }
|
||||
int getNumberOfNotOk() {
|
||||
result =
|
||||
count(Call c |
|
||||
not exists(c.getTarget()) and
|
||||
not c instanceof DelegateCall and
|
||||
not c instanceof DynamicExpr
|
||||
)
|
||||
}
|
||||
|
||||
string getOkText() { result = "calls with call target" }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user