blob: a9a773c53ae8384dcf7f7b6f97107c7d57996c21 [file] [log] [blame]
40 columns |
>>> Empty argument list.
function ( ) ;
<<<
function();
>>> Never split empty argument list.
function_______________________________();
<<<
function_______________________________();
>>> Inline arguments.
function ( argument , another , third ) ;
<<<
function(argument, another, third);
>>> Split arguments and add trailing comma.
function ( argument , another , third , fourth ) ;
<<<
function(
argument,
another,
third,
fourth,
);
>>> Remove trailing comma if unsplit.
function(
argument,
another,
);
<<<
function(argument, another);
>>> With type arguments.
function < int , String > ( 1 , 2 , 3 );
<<<
function<int, String>(1, 2, 3);
>>> Split type arguments but not arguments.
function<VeryLongTypeName, AnotherLongTypeName>(1, 2, 3);
<<<
function<
VeryLongTypeName,
AnotherLongTypeName
>(1, 2, 3);
>>> Split type arguments and arguments.
function<VeryLongTypeName, AnotherLongTypeName>(firstArgument, secondArgument,
thirdArgument);
<<<
function<
VeryLongTypeName,
AnotherLongTypeName
>(
firstArgument,
secondArgument,
thirdArgument,
);
>>> Split in nested type argument.
function<List<NotSplit>, Map<VeryLongTypeName, AnotherLongTypeName>>(1, 2, 3);
<<<
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);
<<<
someFunctionOne(
someArgument,
someFunctionTwo(
argument,
argument,
argument,
),
someFunctionTwo(
argument,
argument,
argument,
),
someArgument,
someArgument,
);