Skip to content

Consider disabling Style/EmptyCaseCondition #229

@aliismayilov

Description

@aliismayilov

I don't find either of following code snippets to be better than the other:

case
when done?       then :done
when exception?  then :exception
else :processing
end
if done?
  :done
elsif exception?
  :exception
else
  :processing
end

in fact, me and colleagues use the first example more often.

original discussion: rubocop/rubocop#3019

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions