Skip to content

Instantly share code, notes, and snippets.

@HaiTo
Created March 2, 2016 03:16
Show Gist options
  • Save HaiTo/c9f373a1ca637407a44c to your computer and use it in GitHub Desktop.
Save HaiTo/c9f373a1ca637407a44c to your computer and use it in GitHub Desktop.
# OK
age = case
when condition
p 'hoge'
end
# OK
piyo =
case
when condition
p 'hoge'
end
# NG
hoge = case
when condition
p 'hoge'
end
@HaiTo
Copy link
Author

HaiTo commented Mar 2, 2016

$ rubocop rubo.rb
Inspecting 1 file
C

Offenses:

rubo.rb:13:3: C: Indent when as deep as case.
  when condition
  ^^^^

1 file inspected, 1 offense detected

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment