blob: e54305c5e91cf8e4d3f01a59bc6ac1e1ccb913e2 [file] [edit]
40 columns |
>>> Empty argument list.
function ( ) ;
<<< 3.7
function();
>>> Never split empty argument list.
function_______________________________();
<<< 3.7
function_______________________________();
>>> Inline arguments.
function ( argument , another , third ) ;
<<< 3.7
function(argument, another, third);
>>> Split arguments and add trailing comma.
function ( argument , another , third , fourth ) ;
<<< 3.7
function(
argument,
another,
third,
fourth,
);
>>> Remove trailing comma if unsplit.
function(
argument,
another,
);
<<< 3.7
function(argument, another);
>>> With type arguments.
function < int , String > ( 1 , 2 , 3 );
<<< 3.7
function<int, String>(1, 2, 3);
>>> Split type arguments but not arguments.
function<VeryLongTypeName, AnotherLongTypeName>(1, 2, 3);
<<< 3.7
function<
VeryLongTypeName,
AnotherLongTypeName
>(1, 2, 3);
>>> Split type arguments and arguments.
function<VeryLongTypeName, AnotherLongTypeName>(firstArgument, secondArgument,
thirdArgument);
<<< 3.7
function<
VeryLongTypeName,
AnotherLongTypeName
>(
firstArgument,
secondArgument,
thirdArgument,
);
>>> Split in nested type argument.
function<List<NotSplit>, Map<VeryLongTypeName, AnotherLongTypeName>>(1, 2, 3);
<<< 3.7
function<
List<NotSplit>,
Map<
VeryLongTypeName,
AnotherLongTypeName
>
>(1, 2, 3);
>>> Multiple nested split arguments.
someFunctionOne(someArgument,
someFunctionTwo(argument, argument, argument),
someFunctionTwo(argument, argument, argument),
someArgument, someArgument);
<<< 3.7
someFunctionOne(
someArgument,
someFunctionTwo(
argument,
argument,
argument,
),
someFunctionTwo(
argument,
argument,
argument,
),
someArgument,
someArgument,
);
>>> Remove blank lines before first and last arguments. Preserve one between.
function(
firstElement,
secondElement,
thirdElement
);
<<< 3.7
function(
firstElement,
secondElement,
thirdElement,
);
>>> Discard blank lines if doesn't need to split.
f(
1,
2,
3,
);
<<< 3.7
f(1, 2, 3);