From e901533298766c21646620f175baeee986ff5577 Mon Sep 17 00:00:00 2001 From: Pierre Bourdon Date: Fri, 24 Jun 2016 10:41:05 +0200 Subject: [PATCH] Add new clang-format config. --- Source/.clang-format | 117 +++++++++++++++++++++++++------------------ 1 file changed, 68 insertions(+), 49 deletions(-) diff --git a/Source/.clang-format b/Source/.clang-format index 0df930b2da06..774ce5ba0760 100644 --- a/Source/.clang-format +++ b/Source/.clang-format @@ -1,55 +1,74 @@ --- Language: Cpp -BasedOnStyle: LLVM -#AccessModifierOffset: -2 -#ConstructorInitializerIndentWidth: 4 -#AlignEscapedNewlinesLeft: false -#AlignTrailingComments: true -#AllowAllParametersOfDeclarationOnNextLine: true -#AllowShortBlocksOnASingleLine: false -#AllowShortIfStatementsOnASingleLine: false -#AllowShortLoopsOnASingleLine: false +AccessModifierOffset: -2 +AlignAfterOpenBracket: Align +AlignConsecutiveAssignments: false +AlignConsecutiveDeclarations: false +AlignEscapedNewlinesLeft: false +AlignOperands: true +AlignTrailingComments: true +AllowAllParametersOfDeclarationOnNextLine: true +AllowShortBlocksOnASingleLine: false +AllowShortCaseLabelsOnASingleLine: false AllowShortFunctionsOnASingleLine: Inline -#AlwaysBreakTemplateDeclarations: false -#AlwaysBreakBeforeMultilineStrings: false -#BreakBeforeBinaryOperators: false -#BreakBeforeTernaryOperators: true -BreakConstructorInitializersBeforeComma: true -#BinPackParameters: true -ColumnLimit: 120 -#ConstructorInitializerAllOnOneLineOrOnePerLine: false -#DerivePointerBinding: false -#ExperimentalAutoDetectBinPacking: false -#IndentCaseLabels: false -#MaxEmptyLinesToKeep: 1 -#KeepEmptyLinesAtTheStartOfBlocks: true -#NamespaceIndentation: None -#ObjCSpaceAfterProperty: false -#ObjCSpaceBeforeProtocolList: true -#PenaltyBreakBeforeFirstCallParameter: 19 -#PenaltyBreakComment: 300 -#PenaltyBreakString: 1000 -#PenaltyBreakFirstLessLess: 120 -#PenaltyExcessCharacter: 1000000 -#PenaltyReturnTypeOnItsOwnLine: 60 -#PointerBindsToType: false -#SpacesBeforeTrailingComments: 1 -#Cpp11BracedListStyle: true -#Standard: Cpp11 -IndentWidth: 4 -TabWidth: 4 -UseTab: ForIndentation +AllowShortIfStatementsOnASingleLine: false +AllowShortLoopsOnASingleLine: false +AlwaysBreakAfterDefinitionReturnType: None +AlwaysBreakAfterReturnType: None +AlwaysBreakBeforeMultilineStrings: false +AlwaysBreakTemplateDeclarations: true +BinPackArguments: true +BinPackParameters: true +BreakBeforeBinaryOperators: None BreakBeforeBraces: Allman -#IndentFunctionDeclarationAfterType: false -#SpacesInParentheses: false -#SpacesInAngles: false -#SpaceInEmptyParentheses: false -#SpacesInCStyleCastParentheses: false -#SpacesInContainerLiterals: true -#SpaceBeforeAssignmentOperators: true -#ContinuationIndentWidth: 4 -#CommentPragmas: '^ IWYU pragma:' -#ForEachMacros: [ foreach, Q_FOREACH, BOOST_FOREACH ] -#SpaceBeforeParens: ControlStatements +BreakBeforeTernaryOperators: false +BreakConstructorInitializersBeforeComma: false +ColumnLimit: 100 +CommentPragmas: '^ (IWYU pragma:|NOLINT)' +ConstructorInitializerAllOnOneLineOrOnePerLine: false +ConstructorInitializerIndentWidth: 4 +ContinuationIndentWidth: 4 +Cpp11BracedListStyle: true +DerivePointerAlignment: false +DisableFormat: false +ForEachMacros: [] +IncludeCategories: + - Regex: '^<' + Priority: 1 + - Regex: '^"' + Priority: 2 +IndentCaseLabels: false +IndentWidth: 2 +IndentWrappedFunctionNames: false +KeepEmptyLinesAtTheStartOfBlocks: false +MacroBlockBegin: '' +MacroBlockEnd: '' +MaxEmptyLinesToKeep: 1 +NamespaceIndentation: None +ObjCBlockIndentWidth: 2 +ObjCSpaceAfterProperty: false +ObjCSpaceBeforeProtocolList: true +PenaltyBreakBeforeFirstCallParameter: 19 +PenaltyBreakComment: 300 +PenaltyBreakFirstLessLess: 120 +PenaltyBreakString: 1000 +PenaltyExcessCharacter: 1000000 +PenaltyReturnTypeOnItsOwnLine: 60 +PointerAlignment: Left +ReflowComments: true +SortIncludes: true +SpaceAfterCStyleCast: false +SpaceBeforeAssignmentOperators: true +SpaceBeforeParens: ControlStatements +SpaceInEmptyParentheses: false +SpacesBeforeTrailingComments: 2 +SpacesInAngles: false +SpacesInContainerLiterals: true +SpacesInCStyleCastParentheses: false +SpacesInParentheses: false +SpacesInSquareBrackets: false +Standard: Cpp11 +TabWidth: 2 +UseTab: Never ...