mirror of
https://github.com/github/codeql.git
synced 2026-01-29 06:12:58 +01:00
Add review feedback
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* @name Defer In Loop
|
||||
* @name Defer in loop
|
||||
* @description A deferred statement in a loop will not execute until the end of the function.
|
||||
* This can lead to unintentionally holding resources open like file handles or database transactions.
|
||||
* @id go/examples/deferinloop
|
||||
@@ -10,5 +10,5 @@
|
||||
import go
|
||||
|
||||
from LoopStmt loop, DeferStmt defer
|
||||
where loop.getAChildStmt+() = defer
|
||||
where loop.getBody().getAChildStmt+() = defer
|
||||
select defer, "This defer statement is in a $@.", loop, "loop"
|
||||
|
||||
Reference in New Issue
Block a user