class RuboCop::Cop::Lint::EmptyWhen

Checks for the presence of ‘when` branches without a body.

@example

# bad
case foo
when bar
  do_something
when baz
end

# good
case condition
when foo
  do_something
when bar
  nil
end

@example AllowComments: true (default)

# good
case condition
when foo
  do_something
when bar
  # noop
end

@example AllowComments: false

# bad
case condition
when foo
  do_something
when bar
  # do nothing
end