diff options
Diffstat (limited to 'protocols/Telegram/tdlib/td/.clang-format')
-rw-r--r-- | protocols/Telegram/tdlib/td/.clang-format | 74 |
1 files changed, 62 insertions, 12 deletions
diff --git a/protocols/Telegram/tdlib/td/.clang-format b/protocols/Telegram/tdlib/td/.clang-format index e169061bab..4e23f1d3a6 100644 --- a/protocols/Telegram/tdlib/td/.clang-format +++ b/protocols/Telegram/tdlib/td/.clang-format @@ -3,26 +3,35 @@ Language: Cpp # BasedOnStyle: Google AccessModifierOffset: -1 AlignAfterOpenBracket: Align -AlignConsecutiveAssignments: false -AlignConsecutiveDeclarations: false +AlignArrayOfStructures: None +AlignConsecutiveMacros: None +AlignConsecutiveAssignments: None +AlignConsecutiveBitFields: None +AlignConsecutiveDeclarations: None AlignEscapedNewlines: Left -AlignOperands: true +AlignOperands: Align AlignTrailingComments: true +AllowAllArgumentsOnNextLine: true +AllowAllConstructorInitializersOnNextLine: true AllowAllParametersOfDeclarationOnNextLine: true -AllowShortBlocksOnASingleLine: false +AllowShortBlocksOnASingleLine: Never AllowShortCaseLabelsOnASingleLine: false +AllowShortEnumsOnASingleLine: true AllowShortFunctionsOnASingleLine: None # All -AllowShortIfStatementsOnASingleLine: false # true +AllowShortIfStatementsOnASingleLine: Never # WithoutElse +AllowShortLambdasOnASingleLine: Inline # All AllowShortLoopsOnASingleLine: false # true AlwaysBreakAfterDefinitionReturnType: None AlwaysBreakAfterReturnType: None AlwaysBreakBeforeMultilineStrings: true -AlwaysBreakTemplateDeclarations: true +AlwaysBreakTemplateDeclarations: Yes BinPackArguments: true BinPackParameters: true +BitFieldColonSpacing: Both BraceWrapping: + AfterCaseLabel: false AfterClass: false - AfterControlStatement: false + AfterControlStatement: Never AfterEnum: false AfterFunction: false AfterNamespace: false @@ -32,13 +41,17 @@ BraceWrapping: AfterExternBlock: false BeforeCatch: false BeforeElse: false + BeforeLambdaBody: false + BeforeWhile: false IndentBraces: false SplitEmptyFunction: true SplitEmptyRecord: true SplitEmptyNamespace: true BreakBeforeBinaryOperators: None BreakBeforeBraces: Attach +BreakBeforeConceptDeclarations: true BreakBeforeInheritanceComma: true # false +BreakInheritanceList: BeforeComma # BeforeColon BreakBeforeTernaryOperators: true BreakConstructorInitializersBeforeComma: true # false BreakConstructorInitializers: BeforeComma # BeforeColon @@ -51,48 +64,85 @@ ConstructorInitializerAllOnOneLineOrOnePerLine: true ConstructorInitializerIndentWidth: 4 ContinuationIndentWidth: 4 Cpp11BracedListStyle: true +DeriveLineEnding: true DerivePointerAlignment: true DisableFormat: false +EmptyLineAfterAccessModifier: Never +EmptyLineBeforeAccessModifier: LogicalBlock ExperimentalAutoDetectBinPacking: false FixNamespaceComments: true -# ForEachMacros: [ foreach, Q_FOREACH, BOOST_FOREACH ] +ForEachMacros: + - Q_FOREACH_THIS_LIST_MUST_BE_NON_EMPTY +IncludeBlocks: Preserve +IncludeCategories: + - Regex: '.*' + Priority: 0 +IndentAccessModifiers: false +IndentCaseBlocks: false IndentCaseLabels: true +IndentExternBlock: AfterExternBlock +IndentGotoLabels: true IndentPPDirectives: None +IndentRequires: false IndentWidth: 2 IndentWrappedFunctionNames: false +# InsertTrailingCommas: None # JavaScriptQuotes: Leave # JavaScriptWrapImports: true KeepEmptyLinesAtTheStartOfBlocks: false +LambdaBodyIndentation: Signature MacroBlockBegin: '' MacroBlockEnd: '' MaxEmptyLinesToKeep: 1 NamespaceIndentation: None +# ObjCBinPackProtocolList: Never # ObjCBlockIndentWidth: 2 +# ObjCBreakBeforeNestedBlockParam: true # ObjCSpaceAfterProperty: false -# ObjCSpaceBeforeProtocolList: false +# ObjCSpaceBeforeProtocolList: true PenaltyBreakAssignment: 2 PenaltyBreakBeforeFirstCallParameter: 1 PenaltyBreakComment: 300 PenaltyBreakFirstLessLess: 120 PenaltyBreakString: 1000 +PenaltyBreakTemplateDeclaration: 10 PenaltyExcessCharacter: 1000000 +PenaltyIndentedWhitespace: 0 PenaltyReturnTypeOnItsOwnLine: 200 -PointerAlignment: Left +PointerAlignment: Right +PPIndentWidth: -1 +ReferenceAlignment: Pointer ReflowComments: false # true -SortIncludes: false # disabled, because we need case insensitive sort +ShortNamespaceLines: 0 # 1 +SortIncludes: CaseInsensitive # CaseSensitive +# SortJavaStaticImport: Before SortUsingDeclarations: false # true SpaceAfterCStyleCast: false +SpaceAfterLogicalNot: false SpaceAfterTemplateKeyword: true +SpaceAroundPointerQualifiers: Default SpaceBeforeAssignmentOperators: true +SpaceBeforeCaseColon: false +SpaceBeforeCpp11BracedList: false +SpaceBeforeCtorInitializerColon: true +SpaceBeforeInheritanceColon: true SpaceBeforeParens: ControlStatements +SpaceBeforeRangeBasedForLoopColon: true +SpaceBeforeSquareBrackets: false +SpaceInEmptyBlock: false SpaceInEmptyParentheses: false SpacesBeforeTrailingComments: 2 -SpacesInAngles: false +SpacesInAngles: Never +SpacesInConditionalStatement: false SpacesInContainerLiterals: true SpacesInCStyleCastParentheses: false +SpacesInLineCommentPrefix: + Minimum: 1 + Maximum: 1 # -1 SpacesInParentheses: false SpacesInSquareBrackets: false Standard: Auto TabWidth: 100 # 8 +UseCRLF: false UseTab: Never ... |