Is your feature request related to a problem? Please describe.
While correct when one thinks indent "relative to statement", the following code reads easier if indented "relative to block start"
# Relative to statement
data = {
users:
User
.where(id: id_list)
.group_by(&:last_name)
.transform_values do |v|
v.map(&:as_json)
end
}
# Relative to block
data = {
users:
User
.where(id: id_list)
.group_by(&:last_name)
.transform_values do |v|
v.map(&:as_json)
end
}
Describe the solution you'd like
Unless there's already a config option I can set that I have yet been able to find, either a new cop or a new option for an existing cop to enforce either style would be great
Describe alternatives you've considered
I've searched the issue list for indent and couldn't find anything. In this particular simple example, I can change the do block to use {}, but some block will be too long or multiple statements
data = {
users:
User
.where(id: id_list)
.group_by(&:last_name)
.transform_values { |v| v.map(&:as_json) }
}
Any help would be greatly appreciated
Is your feature request related to a problem? Please describe.
While correct when one thinks indent "relative to statement", the following code reads easier if indented "relative to block start"
Describe the solution you'd like
Unless there's already a config option I can set that I have yet been able to find, either a new cop or a new option for an existing cop to enforce either style would be great
Describe alternatives you've considered
I've searched the issue list for
indentand couldn't find anything. In this particular simple example, I can change thedoblock to use{}, but some block will be too long or multiple statementsAny help would be greatly appreciated