mirror of
https://github.com/github/codeql.git
synced 2025-12-17 17:23:36 +01:00
13 lines
219 B
Plaintext
13 lines
219 B
Plaintext
/**
|
|
* @name Test for well-formed fors
|
|
*/
|
|
|
|
import csharp
|
|
|
|
from Method m, ForStmt s
|
|
where
|
|
m.getName() = "MainFor" and
|
|
s.getEnclosingCallable() = m and
|
|
count(s.getAnInitializer()) = 1
|
|
select s, s.getInitializer(0)
|