diff --git a/.clang-format b/.clang-format index ab864ef..1f37fb5 100644 --- a/.clang-format +++ b/.clang-format @@ -1,7 +1,7 @@ BasedOnStyle: WebKit IndentWidth: 8 --- -Language: Cpp +Language: C DerivePointerAlignment: false PointerAlignment: Right ColumnLimit: 80 @@ -26,8 +26,8 @@ AllowShortLoopsOnASingleLine: false AlwaysBreakAfterReturnType: None AlwaysBreakBeforeMultilineStrings: true AlwaysBreakTemplateDeclarations: Yes -BinPackArguments: true -BinPackParameters: true +BinPackArguments: false +BinPackParameters: OnePerLine ExperimentalAutoDetectBinPacking: false BitFieldColonSpacing: Both BreakBeforeBraces: Linux @@ -47,7 +47,7 @@ SpacesBeforeTrailingComments: 3 TabWidth: 8 UseTab: AlignWithSpaces PenaltyReturnTypeOnItsOwnLine: 1000000 -PenaltyExcessCharacter: 5 +PenaltyExcessCharacter: 999999999 PenaltyBreakOpenParenthesis: 5 PenaltyBreakBeforeFirstCallParameter: 5 PenaltyIndentedWhitespace: 0 @@ -84,7 +84,7 @@ AllowShortLoopsOnASingleLine: false AlwaysBreakAfterReturnType: None AlwaysBreakBeforeMultilineStrings: true AlwaysBreakTemplateDeclarations: Yes -BinPackArguments: true +BinPackArguments: false BinPackParameters: true ExperimentalAutoDetectBinPacking: false BitFieldColonSpacing: Both @@ -116,3 +116,61 @@ ForEachMacros: - fx_queue_foreach MacroBlockBegin: "FX_TYPE_.*_BEGIN" MacroBlockEnd: "FX_TYPE_.*_END" +--- +Language: Cpp +DerivePointerAlignment: false +PointerAlignment: Right +ColumnLimit: 80 +AlignAfterOpenBracket: AlwaysBreak +AlignConsecutiveAssignments: None +AlignConsecutiveBitFields: None +AlignConsecutiveDeclarations: None +AlignConsecutiveMacros: AcrossEmptyLinesAndComments +AlignEscapedNewlines: Right +AlignOperands: AlignAfterOperator +AlignTrailingComments: true +AllowAllArgumentsOnNextLine: false +AllowAllConstructorInitializersOnNextLine: false +AllowAllParametersOfDeclarationOnNextLine: false +AllowShortBlocksOnASingleLine: Empty +AllowShortCaseLabelsOnASingleLine: false +AllowShortEnumsOnASingleLine: false +AllowShortFunctionsOnASingleLine: false +AllowShortIfStatementsOnASingleLine: false +AllowShortLambdasOnASingleLine: false +AllowShortLoopsOnASingleLine: false +AlwaysBreakAfterReturnType: None +AlwaysBreakBeforeMultilineStrings: true +AlwaysBreakTemplateDeclarations: Yes +BinPackArguments: false +BinPackParameters: OnePerLine +ExperimentalAutoDetectBinPacking: false +BitFieldColonSpacing: Both +BreakBeforeBraces: Linux +BreakBeforeBinaryOperators: All +BreakBeforeTernaryOperators: true +BreakConstructorInitializers: BeforeComma +BreakInheritanceList: BeforeComma +BreakStringLiterals: true +ContinuationIndentWidth: 8 +Cpp11BracedListStyle: true +IncludeBlocks: Regroup +SortIncludes: true +IndentRequires: true +NamespaceIndentation: Inner +ReflowComments: true +SpacesBeforeTrailingComments: 3 +TabWidth: 8 +UseTab: AlignWithSpaces +PenaltyReturnTypeOnItsOwnLine: 1000000 +PenaltyExcessCharacter: 9999999 +PenaltyBreakOpenParenthesis: 5 +PenaltyBreakBeforeFirstCallParameter: 5 +PenaltyIndentedWhitespace: 0 +AttributeMacros: + - FX_API +ForEachMacros: + - fx_btree_foreach + - fx_queue_foreach +MacroBlockBegin: "FX_TYPE_.*_BEGIN" +MacroBlockEnd: "FX_TYPE_.*_END"