From 8a5e664e5dc180e2f5ca15b266229ceeb2c7d92e Mon Sep 17 00:00:00 2001 From: Antonio Cardace Date: Thu, 9 Jul 2020 17:26:38 +0200 Subject: [PATCH] format: add .clang-format file to source tree --- .clang-format | 65 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 65 insertions(+) create mode 100644 .clang-format diff --git a/.clang-format b/.clang-format new file mode 100644 index 0000000000..6f82654aed --- /dev/null +++ b/.clang-format @@ -0,0 +1,65 @@ +Language: Cpp + +TabWidth: 4 +IndentWidth: 4 +UseTab: Never +ColumnLimit: 100 +ContinuationIndentWidth: 4 +UseCRLF: false + +AlignAfterOpenBracket: Align +AlignConsecutiveAssignments: false +AlignConsecutiveDeclarations: false +AlignConsecutiveMacros: true +AlignEscapedNewlines: Left +AlignOperands: true +AlignTrailingComments: true +AllowAllArgumentsOnNextLine: false +AllowAllParametersOfDeclarationOnNextLine: false +AllowShortBlocksOnASingleLine: Empty +AllowShortCaseLabelsOnASingleLine: false +AllowShortFunctionsOnASingleLine: Empty +AllowShortIfStatementsOnASingleLine: Never +AllowShortLoopsOnASingleLine: false +AlwaysBreakAfterReturnType: AllDefinitions +AlwaysBreakBeforeMultilineStrings: false + +BinPackArguments: false +BinPackParameters: false +BreakBeforeBraces: Custom +BraceWrapping: + AfterCaseLabel: true + AfterControlStatement: Never + AfterEnum: false + AfterFunction: true + AfterStruct: false + AfterUnion: false + BeforeElse: false + IndentBraces: false + SplitEmptyFunction: false +BreakBeforeBinaryOperators: All +BreakBeforeTernaryOperators: true +BreakStringLiterals: true + +IncludeBlocks: Preserve +IndentCaseLabels: false +IndentGotoLabels: false +IndentPPDirectives: BeforeHash +IndentWrappedFunctionNames: false +KeepEmptyLinesAtTheStartOfBlocks: false +MaxEmptyLinesToKeep: 1 + +PointerAlignment: Right +ReflowComments: false +SortIncludes: false +SpaceAfterCStyleCast: true +SpaceAfterLogicalNot: true +SpaceBeforeAssignmentOperators: true +SpaceBeforeParens: Always +SpaceBeforeSquareBrackets: false +SpaceInEmptyBlock: false +SpaceInEmptyParentheses: false +SpacesBeforeTrailingComments: 2 +SpacesInCStyleCastParentheses: false +SpacesInContainerLiterals: false +SpacesInParentheses: false