2021-11-06 13:20:53 +03:00
|
|
|
/**
|
|
|
|
* @name Empty block
|
|
|
|
* @kind problem
|
|
|
|
* @problem.severity warning
|
|
|
|
* @id ruby/example/empty-block
|
|
|
|
*/
|
|
|
|
|
|
|
|
import ruby
|
2022-11-03 03:56:36 +03:00
|
|
|
import codeql.ruby.AST
|
2021-11-06 13:20:53 +03:00
|
|
|
|
|
|
|
from Block b
|
2021-11-09 13:07:40 +03:00
|
|
|
where b.getNumberOfStatements() = 0
|
|
|
|
select b, "This is an empty block."
|