mirror of
https://github.com/github/codeql.git
synced 2025-12-17 17:23:36 +01:00
18 lines
495 B
Plaintext
18 lines
495 B
Plaintext
/**
|
|
* @name Test for parameters
|
|
*/
|
|
|
|
import csharp
|
|
|
|
from Method m
|
|
where
|
|
m.hasName("Write") and
|
|
m.getDeclaringType().hasQualifiedName("Methods.Console") and
|
|
m.getParameter(0).isValue() and
|
|
m.getParameter(0).hasName("fmt") and
|
|
m.getParameter(0).getType() instanceof StringType and
|
|
m.getParameter(1).isParams() and
|
|
m.getParameter(1).hasName("args") and
|
|
m.getParameter(1).getType().(ArrayType).getElementType() instanceof ObjectType
|
|
select m, m.getAParameter().getType().toString()
|