mirror of
https://github.com/github/codeql.git
synced 2025-12-17 17:23:36 +01:00
14 lines
260 B
Plaintext
14 lines
260 B
Plaintext
/**
|
|
* @name Increment statements in loops
|
|
* @description Finds increment statements that are nested in a loop
|
|
* @id go/examples/updateinloop
|
|
* @tags nesting
|
|
* increment
|
|
*/
|
|
|
|
import go
|
|
|
|
from IncStmt s, LoopStmt l
|
|
where s.getParent+() = l
|
|
select s, l
|