It would be useful to have something like short_to_long_function_def for boolean checks. Currently statements like this
function foo()
my_really_really_really_long_boolean_check() && return my_really_really_really_long_function_name()
end
get formatted to this, so the result is separated from the conditional:
function foo()
my_really_really_really_long_boolean_check() &&
return my_really_really_really_long_function_name()
end
But I would like an option for it to be formatted to this:
function foo()
if my_really_really_really_long_boolean_check()
return my_really_really_really_long_function_name()
end
end
Likewise this:
function foo()
my_really_really_really_long_boolean_check() || return my_really_really_really_long_function_name()
return 1
end
should be formatted to this:
function foo()
if !my_really_really_really_long_boolean_check()
return my_really_really_really_long_function_name()
end
return 1
end
It would be useful to have something like
short_to_long_function_deffor boolean checks. Currently statements like thisget formatted to this, so the result is separated from the conditional:
But I would like an option for it to be formatted to this:
Likewise this:
should be formatted to this: