summaryrefslogtreecommitdiff
path: root/protocols/Telegram/tdlib/td/.clang-format
diff options
context:
space:
mode:
Diffstat (limited to 'protocols/Telegram/tdlib/td/.clang-format')
-rw-r--r--protocols/Telegram/tdlib/td/.clang-format82
1 files changed, 64 insertions, 18 deletions
diff --git a/protocols/Telegram/tdlib/td/.clang-format b/protocols/Telegram/tdlib/td/.clang-format
index 4e23f1d3a6..8f0a588366 100644
--- a/protocols/Telegram/tdlib/td/.clang-format
+++ b/protocols/Telegram/tdlib/td/.clang-format
@@ -4,15 +4,36 @@ Language: Cpp
AccessModifierOffset: -1
AlignAfterOpenBracket: Align
AlignArrayOfStructures: None
-AlignConsecutiveMacros: None
-AlignConsecutiveAssignments: None
-AlignConsecutiveBitFields: None
-AlignConsecutiveDeclarations: None
+AlignConsecutiveAssignments:
+ Enabled: false
+ AcrossEmptyLines: false
+ AcrossComments: false
+ AlignCompound: false
+ PadOperators: true
+AlignConsecutiveBitFields:
+ Enabled: false
+ AcrossEmptyLines: false
+ AcrossComments: false
+ AlignCompound: false
+ PadOperators: false
+AlignConsecutiveDeclarations:
+ Enabled: false
+ AcrossEmptyLines: false
+ AcrossComments: false
+ AlignCompound: false
+ PadOperators: false
+AlignConsecutiveMacros:
+ Enabled: false
+ AcrossEmptyLines: false
+ AcrossComments: false
+ AlignCompound: false
+ PadOperators: false
AlignEscapedNewlines: Left
AlignOperands: Align
-AlignTrailingComments: true
+AlignTrailingComments:
+ Kind: Always
+ OverEmptyLines: 0
AllowAllArgumentsOnNextLine: true
-AllowAllConstructorInitializersOnNextLine: true
AllowAllParametersOfDeclarationOnNextLine: true
AllowShortBlocksOnASingleLine: Never
AllowShortCaseLabelsOnASingleLine: false
@@ -25,6 +46,8 @@ AlwaysBreakAfterDefinitionReturnType: None
AlwaysBreakAfterReturnType: None
AlwaysBreakBeforeMultilineStrings: true
AlwaysBreakTemplateDeclarations: Yes
+# AttributeMacros:
+# - __capability
BinPackArguments: true
BinPackParameters: true
BitFieldColonSpacing: Both
@@ -33,12 +56,12 @@ BraceWrapping:
AfterClass: false
AfterControlStatement: Never
AfterEnum: false
+ AfterExternBlock: false
AfterFunction: false
AfterNamespace: false
AfterObjCDeclaration: false
AfterStruct: false
AfterUnion: false
- AfterExternBlock: false
BeforeCatch: false
BeforeElse: false
BeforeLambdaBody: false
@@ -47,24 +70,23 @@ BraceWrapping:
SplitEmptyFunction: true
SplitEmptyRecord: true
SplitEmptyNamespace: true
+BreakAfterAttributes: Never
+# BreakAfterJavaFieldAnnotations: false
+BreakArrays: true
BreakBeforeBinaryOperators: None
BreakBeforeBraces: Attach
-BreakBeforeConceptDeclarations: true
-BreakBeforeInheritanceComma: true # false
-BreakInheritanceList: BeforeComma # BeforeColon
+BreakBeforeConceptDeclarations: Always
+BreakBeforeInlineASMColon: OnlyMultiline
BreakBeforeTernaryOperators: true
-BreakConstructorInitializersBeforeComma: true # false
BreakConstructorInitializers: BeforeComma # BeforeColon
-# BreakAfterJavaFieldAnnotations: false
+BreakInheritanceList: BeforeComma # BeforeColon
BreakStringLiterals: true
ColumnLimit: 120 # 80
CommentPragmas: '^ IWYU pragma:'
CompactNamespaces: false
-ConstructorInitializerAllOnOneLineOrOnePerLine: true
ConstructorInitializerIndentWidth: 4
ContinuationIndentWidth: 4
Cpp11BracedListStyle: true
-DeriveLineEnding: true
DerivePointerAlignment: true
DisableFormat: false
EmptyLineAfterAccessModifier: Never
@@ -83,14 +105,21 @@ IndentCaseLabels: true
IndentExternBlock: AfterExternBlock
IndentGotoLabels: true
IndentPPDirectives: None
-IndentRequires: false
+IndentRequiresClause: true
IndentWidth: 2
IndentWrappedFunctionNames: false
+InsertBraces: false
+InsertNewlineAtEOF: false
# InsertTrailingCommas: None
+IntegerLiteralSeparator:
+ Binary: 0
+ Decimal: 0
+ Hex: 0
# JavaScriptQuotes: Leave
# JavaScriptWrapImports: true
KeepEmptyLinesAtTheStartOfBlocks: false
LambdaBodyIndentation: Signature
+LineEnding: DeriveLF
MacroBlockBegin: ''
MacroBlockEnd: ''
MaxEmptyLinesToKeep: 1
@@ -100,23 +129,31 @@ NamespaceIndentation: None
# ObjCBreakBeforeNestedBlockParam: true
# ObjCSpaceAfterProperty: false
# ObjCSpaceBeforeProtocolList: true
+PackConstructorInitializers: NextLine
PenaltyBreakAssignment: 2
PenaltyBreakBeforeFirstCallParameter: 1
PenaltyBreakComment: 300
PenaltyBreakFirstLessLess: 120
+PenaltyBreakOpenParenthesis: 0
PenaltyBreakString: 1000
PenaltyBreakTemplateDeclaration: 10
PenaltyExcessCharacter: 1000000
PenaltyIndentedWhitespace: 0
PenaltyReturnTypeOnItsOwnLine: 200
-PointerAlignment: Right
+PointerAlignment: Right # Left
PPIndentWidth: -1
+QualifierAlignment: Leave
ReferenceAlignment: Pointer
ReflowComments: false # true
+RemoveBracesLLVM: false
+RemoveSemicolon: false
+RequiresClausePosition: OwnLine
+RequiresExpressionIndentation: OuterScope
+SeparateDefinitionBlocks: Leave
ShortNamespaceLines: 0 # 1
SortIncludes: CaseInsensitive # CaseSensitive
# SortJavaStaticImport: Before
-SortUsingDeclarations: false # true
+SortUsingDeclarations: Lexicographic # LexicographicNumeric
SpaceAfterCStyleCast: false
SpaceAfterLogicalNot: false
SpaceAfterTemplateKeyword: true
@@ -127,6 +164,16 @@ SpaceBeforeCpp11BracedList: false
SpaceBeforeCtorInitializerColon: true
SpaceBeforeInheritanceColon: true
SpaceBeforeParens: ControlStatements
+SpaceBeforeParensOptions:
+ AfterControlStatements: true
+ AfterForeachMacros: true
+ AfterFunctionDefinitionName: false
+ AfterFunctionDeclarationName: false
+ AfterIfMacros: true
+ AfterOverloadedOperator: false
+ AfterRequiresInClause: false
+ AfterRequiresInExpression: false
+ BeforeNonEmptyParentheses: false
SpaceBeforeRangeBasedForLoopColon: true
SpaceBeforeSquareBrackets: false
SpaceInEmptyBlock: false
@@ -143,6 +190,5 @@ SpacesInParentheses: false
SpacesInSquareBrackets: false
Standard: Auto
TabWidth: 100 # 8
-UseCRLF: false
UseTab: Never
...