From 071b102496078d64d6c31fa3da37edc722ef7407 Mon Sep 17 00:00:00 2001 From: Ralph Boehme Date: Fri, 30 Jun 2023 13:00:23 +0200 Subject: [PATCH] clang-format: tweak config to bring us closer to README.Coding. I'm enabling "AllowAllArgumentsOnNextLine" because that's longstanding practice with many many function calls like tevent_req_callback_data() and tevent_req_data() and imho results in the most readable code at the place where this is often seen (variable declartions with tevent_req_* stuff). Signed-off-by: Ralph Boehme Reviewed-by: Andreas Schneider --- .clang-format | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.clang-format b/.clang-format index 5385807bc1c..6c7a021a44c 100644 --- a/.clang-format +++ b/.clang-format @@ -12,6 +12,7 @@ BraceWrapping: AfterExternBlock: true BeforeElse: false BeforeWhile: false + AfterControlStatement: MultiLine AllowShortIfStatementsOnASingleLine: false ColumnLimit: 80 IndentCaseLabels: false @@ -19,8 +20,14 @@ AlignAfterOpenBracket: Align BinPackParameters: false BinPackArguments: false AllowAllParametersOfDeclarationOnNextLine: false -AllowAllArgumentsOnNextLine: false +AllowAllArgumentsOnNextLine: true AllowShortFunctionsOnASingleLine: Empty AlwaysBreakAfterReturnType: None AlignEscapedNewlines: Left SortIncludes: false +IndentGotoLabels: false +WhitespaceSensitiveMacros: ['DEBUG'] +PenaltyReturnTypeOnItsOwnLine: 1000 +PenaltyBreakAssignment: 200 +PenaltyBreakBeforeFirstCallParameter: 100 +BreakBeforeBinaryOperators: None