Skip to content

Commit 6bf05eb

Browse files
committed
C#: Exclude delegate and dynamic calls from extractor telemetry
1 parent f57e0cb commit 6bf05eb

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

csharp/ql/src/Telemetry/ExtractorInformation.ql

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,14 @@ module ReportStats<StatsSig Stats> {
120120
module CallTargetStats implements StatsSig {
121121
int getNumberOfOk() { result = count(Call c | exists(c.getTarget())) }
122122

123-
int getNumberOfNotOk() { result = count(Call c | not exists(c.getTarget())) }
123+
int getNumberOfNotOk() {
124+
result =
125+
count(Call c |
126+
not exists(c.getTarget()) and
127+
not c instanceof DelegateCall and
128+
not c instanceof DynamicExpr
129+
)
130+
}
124131

125132
string getOkText() { result = "calls with call target" }
126133

0 commit comments

Comments
 (0)