-
Notifications
You must be signed in to change notification settings - Fork 226
Closed
Labels
rule change 👩⚖️Suggest a style guide rule changeSuggest a style guide rule change
Description
Not sure if this is the correct place to make a suggestion, but it would be good to have RuboCop::Cop::Layout::EmptyLineAfterGuardClause
enabled.
Personally, I've always favored empty lines for code organization and context management, this rule helps with code readability as it makes it clearer which lines or "blocks" are "breaking" earlier.
Examples from Rubocop docs:
# bad
def foo
return if need_return?
bar
end
# good
def foo
return if need_return?
bar
end
# good
def foo
return if something?
return if something_different?
bar
end
# also good
def foo
if something?
do_something
return if need_return?
end
end
Metadata
Metadata
Assignees
Labels
rule change 👩⚖️Suggest a style guide rule changeSuggest a style guide rule change