From d561830a5242a00545a320acb80be083dd590d05 Mon Sep 17 00:00:00 2001 From: Tom Praschan <13141438+tom-anders@users.noreply.github.com> Date: Sun, 28 May 2023 15:39:43 +0200 Subject: [PATCH] build: align .clang-format rules with uncrustify config Difference can be seen e.g. in qf_add_entry(), where clang-format previously would want to place each parameter declaration on its own line (BinPackParameter: false), while uncrustify behaves if as BinPackParameters was set to true. Same goes for BinPackArguments. See https://clang.llvm.org/docs/ClangFormatStyleOptions.html#BinPackParameters and https://clang.llvm.org/docs/ClangFormatStyleOptions.html#binpackarguments --- .clang-format | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.clang-format b/.clang-format index a31d753217..9f45ac32e2 100644 --- a/.clang-format +++ b/.clang-format @@ -14,7 +14,7 @@ PenaltyReturnTypeOnItsOwnLine: 200 AllowAllParametersOfDeclarationOnNextLine: false AllowShortIfStatementsOnASingleLine: false AllowShortLoopsOnASingleLine: false -BinPackParameters: false +BinPackParameters: true BreakBeforeBinaryOperators: true BreakBeforeTernaryOperators: true ContinuationIndentWidth: 2 @@ -23,7 +23,7 @@ AlwaysBreakAfterReturnType: None AlwaysBreakBeforeMultilineStrings: No AlwaysBreakTemplateDeclarations: No AlignEscapedNewlines: DontAlign -BinPackArguments: false +BinPackArguments: true BraceWrapping: AfterClass: false AfterControlStatement: false