diff --git a/.clang-format b/.clang-format new file mode 100644 index 00000000..37610360 --- /dev/null +++ b/.clang-format @@ -0,0 +1,33 @@ +--- +Language: Cpp +BasedOnStyle: Mozilla + +AllowAllParametersOfDeclarationOnNextLine: false +AllowShortBlocksOnASingleLine: true +AllowShortFunctionsOnASingleLine: true +AllowShortIfStatementsOnASingleLine: false +AlignAfterOpenBracket: Align +AlignConsecutiveAssignments: false +AlignConsecutiveDeclarations: false +AlwaysBreakAfterReturnType: None +AlwaysBreakAfterDefinitionReturnType: None +BinPackArguments: false +BinPackParameters: false +BreakBeforeBinaryOperators: NonAssignment +BreakConstructorInitializers: BeforeComma +ColumnLimit: 100 +ConstructorInitializerIndentWidth: 4 +ContinuationIndentWidth: 4 +Cpp11BracedListStyle: true +DerivePointerAlignment: true +FixNamespaceComments: true +IndentWidth: 4 +IndentWrappedFunctionNames: true +IncludeBlocks: Regroup +NamespaceIndentation: None +PointerAlignment: Left +SortIncludes: true +SpacesBeforeTrailingComments: 3 +Standard: Cpp11 +UseTab: Never +... diff --git a/fairmq/.clang-format b/fairmq/.clang-format deleted file mode 100644 index 50728c64..00000000 --- a/fairmq/.clang-format +++ /dev/null @@ -1,54 +0,0 @@ ---- -Language: Cpp -#AccessModifierOffset: -4 -ConstructorInitializerIndentWidth: 4 -AlignEscapedNewlinesLeft: true -AlignTrailingComments: true -AllowAllParametersOfDeclarationOnNextLine: false -AllowShortIfStatementsOnASingleLine: false -AllowShortLoopsOnASingleLine: false -AllowShortFunctionsOnASingleLine: false -AlwaysBreakTemplateDeclarations: true - -# It is broken on windows. Breaks all #include "header.h" -#AlwaysBreakBeforeMultilineStrings: true - -BreakBeforeBinaryOperators: false -BreakBeforeTernaryOperators: true -BreakConstructorInitializersBeforeComma: true -BinPackParameters: false -ColumnLimit: 160 -ConstructorInitializerAllOnOneLineOrOnePerLine: false -ConstructorInitializerIndentWidth: 4 -DerivePointerBinding: false -ExperimentalAutoDetectBinPacking: false -IndentCaseLabels: true -MaxEmptyLinesToKeep: 1 -NamespaceIndentation: None -ObjCSpaceAfterProperty: false -ObjCSpaceBeforeProtocolList: false -PenaltyBreakBeforeFirstCallParameter: 1 -PenaltyBreakComment: 300 -PenaltyBreakString: 1000 -PenaltyBreakFirstLessLess: 120 -PenaltyExcessCharacter: 1000000 -PenaltyReturnTypeOnItsOwnLine: 200 -PointerBindsToType: true -SpacesBeforeTrailingComments: 1 -Cpp11BracedListStyle: false -Standard: Cpp11 -IndentWidth: 4 -TabWidth: 4 -UseTab: Never -BreakBeforeBraces: Allman -IndentFunctionDeclarationAfterType: true -SpacesInParentheses: false -SpacesInAngles: false -SpaceInEmptyParentheses: false -SpacesInCStyleCastParentheses: false -SpacesInContainerLiterals: true -SpaceBeforeAssignmentOperators: true -ContinuationIndentWidth: 4 -CommentPragmas: '^ IWYU pragma:' -SpaceBeforeParens: ControlStatements -...