From 4cd1988d47c7da43fb7e3f5d7bf9d39e144d59c7 Mon Sep 17 00:00:00 2001 From: Rupert Date: Mon, 6 Jan 2025 21:13:08 +0100 Subject: [PATCH] clang-format update making it a little better --- .clang-format | 40 +++++++++++++++++++++++++++------------- 1 file changed, 27 insertions(+), 13 deletions(-) diff --git a/.clang-format b/.clang-format index 70e998c..0a5b3c9 100644 --- a/.clang-format +++ b/.clang-format @@ -8,6 +8,7 @@ BasedOnStyle: WebKit SortIncludes: false + AlignAfterOpenBracket: Align AlignArrayOfStructures: Right AlignConsecutiveAssignments: @@ -16,34 +17,47 @@ AlignConsecutiveAssignments: AcrossComments: true AlignCompound: true AlignFunctionPointers: false - PadOperators: true -AlignConsecutiveDeclarations: Consecutive -AlignConsecutiveMacros: Consecutive -AlignEscapedNewlines: Left + PadOperators: false +AlignConsecutiveBitFields: AcrossComments +AlignConsecutiveDeclarations: AcrossComments +AlignConsecutiveMacros: AcrossComments +AlignConsecutiveShortCaseStatements: + Enabled: true + AcrossEmptyLines: true + AcrossComments: true + AlignCaseColons: true +AlignEscapedNewlines: LeftWithLastLine +AlignOperands: Align + +AllowAllArgumentsOnNextLine: false +AllowAllParametersOfDeclarationOnNextLine: false +AllowShortBlocksOnASingleLine: Never +AllowShortCaseLabelsOnASingleLine: true +AllowShortEnumsOnASingleLine: false +AllowShortFunctionsOnASingleLine: None -AllowAllParametersOfDeclarationOnNextLine: true -BreakAfterReturnType: Automatic BinPackArguments: true BinPackParameters: true + +BitFieldColonSpacing: After + +BreakAfterReturnType: Automatic +BreakBeforeBinaryOperators: None BreakBeforeBraces: Linux +BreakBeforeTernaryOperators: false +BreakStringLiterals: false IndentWidth: 8 PointerAlignment: Right UseTab: ForIndentation -SpaceBeforeParens: ControlStatementsExceptControlMacros +SpaceBeforeParens: ControlStatements SpaceAfterLogicalNot: false SpaceAfterCStyleCast: false - - - - ColumnLimit: 80 PenaltyBreakAssignment: 60 PenaltyBreakBeforeFirstCallParameter: 100 PenaltyBreakOpenParenthesis: 40 PenaltyExcessCharacter: 1 -# Strings are more often longer by usage, so let's give these slightly -# more space to breath. PenaltyBreakString: 60 PenaltyReturnTypeOnItsOwnLine: 90