vscode-codeql-starter/codeql-custom-queries-ruby/example.ql

14 строки
229 B
Plaintext

/**
* @name Empty block
* @kind problem
* @problem.severity warning
* @id ruby/example/empty-block
*/
import ruby
import codeql.ruby.AST
from Block b
where b.getNumberOfStatements() = 0
select b, "This is an empty block."