You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Style/CaseLikeIf cop currently always flags any if/elsif sections that could be refactored to use case/when instead.
I would like the ability to restrict failures to if/elsif sections that have X or more branches.
It makes sense to my team that large blocks of if/elsif that have simple actions in each branch make sense to convert to case/when. But if there are only 2 branches, or if the code within each branch is a large block, it is clearer to keep it as if/elsif.
So additional options for the cop configuration would be welcome. For now we will be disabling this cop.
The text was updated successfully, but these errors were encountered:
The Style/CaseLikeIf cop currently always flags any if/elsif sections that could be refactored to use case/when instead.
I would like the ability to restrict failures to if/elsif sections that have X or more branches.
It makes sense to my team that large blocks of if/elsif that have simple actions in each branch make sense to convert to case/when. But if there are only 2 branches, or if the code within each branch is a large block, it is clearer to keep it as if/elsif.
So additional options for the cop configuration would be welcome. For now we will be disabling this cop.
The text was updated successfully, but these errors were encountered: