Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

BracketAlignmentStyle: Break before closing parenthesis

Combining the AlignAfterOpenBracket (BracketAlignmentStyle) option with BinPackArguments and BinPackParameters set to false, it's possible to get the following formatting:

someShortFunction(argument);
someVeryVeryVeryLongFunction(
    argument1,
    argument2,
    argument3,
    argument4);

However, similar to BreakBeforeBraces, I'd like to break before the closing parenthesis:

someShortFunction(argument);
someVeryVeryVeryLongFunction(
    argument1,
    argument2,
    argument3,
    argument4
);

Is this possible with the existing options?

like image 266
Julius Bullinger Avatar asked Nov 14 '17 14:11

Julius Bullinger


1 Answers

It's not possible with the current clang options. However, there is a patch proposed that adds this change. It was stale for a long time, so it probably wouldn't get added any time soon. You still can use the patched version for your purposes. Here is a clang fork with the patch applied.

like image 175
Attila Avatar answered Oct 28 '22 22:10

Attila