From 869138cd1a1d1d918d686c4f7613e16eda2206d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabian=20Ke=C3=9Fler?= Date: Thu, 20 Jun 2019 02:42:10 +0200 Subject: [PATCH 1/2] fixed .clangformat MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Fabian Keßler --- .clang-format | 64 ++++++++++++++++++++++++++++++--------------------- 1 file changed, 38 insertions(+), 26 deletions(-) diff --git a/.clang-format b/.clang-format index c6faa0a4..e599846d 100644 --- a/.clang-format +++ b/.clang-format @@ -1,58 +1,68 @@ -BasedOnStyle: WebKit +--- +BasedOnStyle: WebKit AccessModifierOffset: -4 -AlignEscapedNewlinesLeft: true +AlignAfterOpenBracket: Align +AlignConsecutiveAssignments: false +AlignConsecutiveDeclarations: false +AlignEscapedNewlines: Left +AlignOperands: true AlignTrailingComments: true -AllowAllParametersOfDeclarationOnNextLine: false +AllowAllParametersOfDeclarationOnNextLine: true AllowShortBlocksOnASingleLine: false AllowShortCaseLabelsOnASingleLine: false AllowShortFunctionsOnASingleLine: None -AllowShortIfStatementsOnASingleLine: true +AllowShortIfStatementsOnASingleLine: false AllowShortLoopsOnASingleLine: false -AlwaysBreakAfterDefinitionReturnType: false -AlwaysBreakBeforeMultilineStrings: true +AlwaysBreakAfterDefinitionReturnType: None +AlwaysBreakAfterReturnType: None +AlwaysBreakBeforeMultilineStrings: false AlwaysBreakTemplateDeclarations: true - BinPackArguments: false BinPackParameters: true -BreakBeforeBinaryOperators: NonAssignment +BreakBeforeBinaryOperators: None BreakBeforeBraces: Allman -BreakBeforeTernaryOperators: true -BreakConstructorInitializersBeforeComma: true - +BreakBeforeTernaryOperators: false +BreakConstructorInitializers: AfterColon +BreakInheritanceList: AfterColon +BreakStringLiterals: true ColumnLimit: 120 +CompactNamespaces: true ConstructorInitializerAllOnOneLineOrOnePerLine: false -ConstructorInitializerIndentWidth: 4 -ContinuationIndentWidth: 16 - +ConstructorInitializerIndentWidth: 8 +ContinuationIndentWidth: 8 +Cpp11BracedListStyle: true DerivePointerAlignment: false - -ExperimentalAutoDetectBinPacking: false - +DisableFormat: false +ExperimentalAutoDetectBinPacking: true +FixNamespaceComments: true +IncludeBlocks: Preserve IndentCaseLabels: false +IndentPPDirectives: AfterHash IndentWidth: 4 -IndentWrappedFunctionNames: false - +IndentWrappedFunctionNames: true KeepEmptyLinesAtTheStartOfBlocks: true - Language: Cpp - MaxEmptyLinesToKeep: 2 - NamespaceIndentation: None - PenaltyReturnTypeOnItsOwnLine: 10000 PointerAlignment: Left -# PointerBindsToType: true - -SortIncludes: false +ReflowComments: false #true +SortIncludes: false #true +SortUsingDeclarations: false #true SpaceAfterCStyleCast: true +SpaceAfterTemplateKeyword: true SpaceBeforeAssignmentOperators: true +SpaceBeforeCpp11BracedList: false +SpaceBeforeCtorInitializerColon: false +SpaceBeforeInheritanceColon: false SpaceBeforeParens: ControlStatements +SpaceBeforeRangeBasedForLoopColon: false SpaceInEmptyParentheses: false SpacesBeforeTrailingComments: 2 SpacesInAngles: false SpacesInCStyleCastParentheses: false +SpacesInContainerLiterals: false SpacesInParentheses: false SpacesInSquareBrackets: false Standard: Cpp11 @@ -60,3 +70,5 @@ Standard: Cpp11 TabWidth: 4 UseTab: ForIndentation + +... From 2d51e74d0cf9877762b66b0b097dbe7e3e032d52 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabian=20Ke=C3=9Fler?= Date: Fri, 21 Jun 2019 00:53:03 +0200 Subject: [PATCH 2/2] Applied @JJones feedback --- .clang-format | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.clang-format b/.clang-format index e599846d..ccf13285 100644 --- a/.clang-format +++ b/.clang-format @@ -12,24 +12,24 @@ AllowAllParametersOfDeclarationOnNextLine: true AllowShortBlocksOnASingleLine: false AllowShortCaseLabelsOnASingleLine: false AllowShortFunctionsOnASingleLine: None -AllowShortIfStatementsOnASingleLine: false +AllowShortIfStatementsOnASingleLine: true AllowShortLoopsOnASingleLine: false AlwaysBreakAfterDefinitionReturnType: None AlwaysBreakAfterReturnType: None AlwaysBreakBeforeMultilineStrings: false AlwaysBreakTemplateDeclarations: true -BinPackArguments: false +BinPackArguments: true BinPackParameters: true BreakBeforeBinaryOperators: None BreakBeforeBraces: Allman BreakBeforeTernaryOperators: false -BreakConstructorInitializers: AfterColon +#BreakConstructorInitializers: BeforeColon BreakInheritanceList: AfterColon BreakStringLiterals: true ColumnLimit: 120 CompactNamespaces: true ConstructorInitializerAllOnOneLineOrOnePerLine: false -ConstructorInitializerIndentWidth: 8 +ConstructorInitializerIndentWidth: 1 ContinuationIndentWidth: 8 Cpp11BracedListStyle: true DerivePointerAlignment: false