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

14 lines
243 B
Plaintext

/**
* @id js/examples/singletonblock
* @name Singleton blocks
* @description Finds block statements containing a single statement
* @tags block
* statement
*/
import javascript
from BlockStmt b
where b.getNumStmt() = 1
select b