mirror of
https://github.com/github/codeql.git
synced 2026-05-05 05:35:13 +02:00
C#: Exclude non source parameters from arguments test cases (otherwise the test reports indexer access and calls to Add for list and collection creations).
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
import csharp
|
||||
|
||||
from Call call, Expr arg, Parameter param
|
||||
where arg = call.getArgumentForParameter(param)
|
||||
where
|
||||
arg = call.getArgumentForParameter(param) and
|
||||
call.getTarget().fromSource()
|
||||
select call, arg, param
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import csharp
|
||||
|
||||
from Parameter param
|
||||
where param.getCallable().fromSource()
|
||||
select param, param.getAnAssignedArgument()
|
||||
|
||||
Reference in New Issue
Block a user