-
-
Notifications
You must be signed in to change notification settings - Fork 19
Open
Description
# Yes
function my_large_function(argument1, argument2,
argument3, argument4,
argument5, x, y, z)
# No
function my_large_function(argument1,
argument2,
argument3,
argument4,
argument5,
x,
y,
z)
Any reason not to prefer the Blue style advice here:
function my_large_function(
argument1, argument2,
argument3, argument4,
argument5, x, y, z
)
# code
end
Notably, when there are many arguments in multiple lines, no argument is placed on the same line as the function name.
All arguments are at the same, one-level, indentation, so there is no custom indentation here and there are no alignment issues if, say, the function name changes.
Also, the closing parenthesis is alone in its own line, making very clear when the argument list stops and the code begins.
However it'd be fine that not every argument is on its own line (as enforced by Blue, but relaxed here).
thazhemadam and cmichelenstroferthazhemadam and cmichelenstrofer
Metadata
Metadata
Assignees
Labels
No labels