mirror of
https://github.com/github/codeql.git
synced 2026-03-24 00:16:49 +01:00
11 lines
253 B
Plaintext
11 lines
253 B
Plaintext
/**
|
|
* @name Test for well-formed foreachs
|
|
*/
|
|
import csharp
|
|
|
|
from Method m
|
|
where m.getName() = "MainForeach"
|
|
and count(LocalVariable v | v.getVariableDeclExpr().getEnclosingCallable() = m
|
|
and v.getName() = "s") = 1
|
|
select m
|