Files
codeql/python/ql/examples/snippets/emptyblock.ql
2019-07-26 17:47:11 +02:00

14 lines
280 B
Plaintext

/**
* @name Empty blocks
* @description Finds the first statement in a block consisting of nothing but Pass statements
* @tags empty
* block
* statement
*/
import python
from StmtList blk
where not exists(Stmt s | not s instanceof Pass)
select blk.getItem(0)