mirror of
https://github.com/github/codeql.git
synced 2025-12-16 16:53:25 +01:00
15 lines
309 B
Plaintext
15 lines
309 B
Plaintext
/**
|
|
* @id py/examples/emptyblock
|
|
* @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)
|