mirror of
https://github.com/github/codeql.git
synced 2026-03-24 00:16:49 +01:00
12 lines
278 B
Plaintext
12 lines
278 B
Plaintext
/**
|
|
* @name Test for well-formed foreachs
|
|
*/
|
|
import csharp
|
|
|
|
from Method m, ForeachStmt s
|
|
where m.getName() = "MainForeach"
|
|
and s.getEnclosingCallable() = m
|
|
and s.getVariable().getName() = "s"
|
|
and s.getVariable().getType() instanceof StringType
|
|
select s, s.getVariable()
|