mirror of
https://github.com/github/codeql.git
synced 2025-12-18 01:33:15 +01:00
14 lines
281 B
Plaintext
14 lines
281 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()
|