class RuboCop::Cop::Lint::EmptyInPattern


end
# noop
in [a, b]
do_something
in [a]
case condition
# bad
@example AllowComments: false
end
# noop
in [a, b]
do_something
in [a]
case condition
# good
@example AllowComments: true (default)
end
nil
in [a, b]
do_something
in [a]
case condition
# good
end
in [a, b]
do_something
in [a]
case condition
# bad
@example
This cop checks for the presence of ‘in` pattern branches without a body.

def on_case_match(node)

def on_case_match(node)
  node.in_pattern_branches.each do |branch|
    next if branch.body || (cop_config['AllowComments'] && comment_lines?(node))
    add_offense(branch)
  end
end