From 7e1b002c86c4d5805539d9eb056931d32af060c1 Mon Sep 17 00:00:00 2001 From: Pavel Odintsov Date: Wed, 20 Apr 2022 19:01:11 +0100 Subject: [PATCH] Aligned code style with Advanced version for consistency --- src/.clang-format | 54 ++++++++++++++++++++++++++++++----------------- 1 file changed, 35 insertions(+), 19 deletions(-) diff --git a/src/.clang-format b/src/.clang-format index 4f978b20..47da5836 100644 --- a/src/.clang-format +++ b/src/.clang-format @@ -1,32 +1,46 @@ --- -BreakBeforeBraces: Attach +Language: Cpp AccessModifierOffset: 0 +AlignAfterOpenBracket: true +AlignConsecutiveAssignments: true AlignEscapedNewlinesLeft: true +AlignOperands: true AlignTrailingComments: false AllowAllParametersOfDeclarationOnNextLine: false -AllowShortFunctionsOnASingleLine: false +AllowShortBlocksOnASingleLine: false +AllowShortCaseLabelsOnASingleLine: false +AllowShortFunctionsOnASingleLine: None AllowShortIfStatementsOnASingleLine: true AllowShortLoopsOnASingleLine: false +AlwaysBreakAfterDefinitionReturnType: None AlwaysBreakBeforeMultilineStrings: false AlwaysBreakTemplateDeclarations: false +BinPackArguments: true BinPackParameters: false -BreakBeforeBinaryOperators: false +BreakBeforeBinaryOperators: None +BreakBeforeBraces: Attach BreakBeforeTernaryOperators: false BreakConstructorInitializersBeforeComma: false -ColumnLimit: 100 -CommentPragmas: '' +ColumnLimit: 120 +CommentPragmas: '' ConstructorInitializerAllOnOneLineOrOnePerLine: false ConstructorInitializerIndentWidth: 0 -ContinuationIndentWidth: 0 +# Of line should be splitted to two lines we are using this additional indent +ContinuationIndentWidth: 4 Cpp11BracedListStyle: false -DerivePointerBinding: false -PointerAlignment: Left +DerivePointerAlignment: false +DisableFormat: false +ExperimentalAutoDetectBinPacking: false +ForEachMacros: [ foreach, Q_FOREACH, BOOST_FOREACH ] IndentCaseLabels: false -IndentFunctionDeclarationAfterType: false -IndentWidth: 4 -Language: Cpp +IndentWidth: 4 +IndentWrappedFunctionNames: false +KeepEmptyLinesAtTheStartOfBlocks: true +MacroBlockBegin: '' +MacroBlockEnd: '' MaxEmptyLinesToKeep: 2 NamespaceIndentation: None +ObjCBlockIndentWidth: 2 ObjCSpaceAfterProperty: true ObjCSpaceBeforeProtocolList: true PenaltyBreakBeforeFirstCallParameter: 100 @@ -35,17 +49,19 @@ PenaltyBreakFirstLessLess: 0 PenaltyBreakString: 100 PenaltyExcessCharacter: 1 PenaltyReturnTypeOnItsOwnLine: 20 +PointerAlignment: Left +SpaceAfterCStyleCast: false SpaceBeforeAssignmentOperators: true -SpaceBeforeParens: ControlStatements +SpaceBeforeParens: ControlStatements SpaceInEmptyParentheses: false SpacesBeforeTrailingComments: 1 -SpacesInAngles: false -SpacesInCStyleCastParentheses: false +SpacesInAngles: false SpacesInContainerLiterals: false +SpacesInCStyleCastParentheses: false SpacesInParentheses: false -Standard: Cpp03 -TabWidth: 4 -UseTab: Never -# Sopported only from clang 3.7 -# AlignConsecutiveAssignments: false +SpacesInSquareBrackets: false +Standard: Cpp11 +TabWidth: 4 +UseTab: Never ... +