【发布时间】:2023-03-25 21:14:01
【问题描述】:
我如何让 rubo-cop 接受以下正确的案例选择:
variable = case some_other_variable
when 'some value' then 'some result'
when 'some other value' then 'some other result'
when 'one more value' then 'one more result'
end
我目前在我的.rubocop.yml:
CaseIndentation:
EnforcedStyle: end
IndentOneStep: true
但它总是像这样出错:
C: Layout/CaseIndentation: Indent when one step more than end.
when 'some value' then 'some result'
我做错了什么,我该如何解决?
【问题讨论】: