aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorlevlam <levlam@telegram.org>2021-12-10 01:31:04 +0300
committerlevlam <levlam@telegram.org>2021-12-10 01:31:04 +0300
commitb799390efa7e50300ff65aeb7a28afae1c5f9cb1 (patch)
tree3b1a8c89d4d6dd27ba8885c7927351c48364059d
parent1bb9b7dfa9f3237ab9c32511acf649f761864173 (diff)
Update .clang-format: enable include sorting.
-rw-r--r--.clang-format42
1 files changed, 34 insertions, 8 deletions
diff --git a/.clang-format b/.clang-format
index 6ce3c0d61..4e23f1d3a 100644
--- a/.clang-format
+++ b/.clang-format
@@ -3,17 +3,20 @@ Language: Cpp
# BasedOnStyle: Google
AccessModifierOffset: -1
AlignAfterOpenBracket: Align
-AlignConsecutiveMacros: false
-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: Never
AllowShortCaseLabelsOnASingleLine: false
+AllowShortEnumsOnASingleLine: true
AllowShortFunctionsOnASingleLine: None # All
AllowShortIfStatementsOnASingleLine: Never # WithoutElse
AllowShortLambdasOnASingleLine: Inline # All
@@ -24,10 +27,11 @@ AlwaysBreakBeforeMultilineStrings: true
AlwaysBreakTemplateDeclarations: Yes
BinPackArguments: true
BinPackParameters: true
+BitFieldColonSpacing: Both
BraceWrapping:
AfterCaseLabel: false
AfterClass: false
- AfterControlStatement: false
+ AfterControlStatement: Never
AfterEnum: false
AfterFunction: false
AfterNamespace: false
@@ -37,12 +41,15 @@ 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
@@ -60,21 +67,30 @@ Cpp11BracedListStyle: true
DeriveLineEnding: true
DerivePointerAlignment: true
DisableFormat: false
+EmptyLineAfterAccessModifier: Never
+EmptyLineBeforeAccessModifier: LogicalBlock
ExperimentalAutoDetectBinPacking: false
FixNamespaceComments: true
ForEachMacros:
- Q_FOREACH_THIS_LIST_MUST_BE_NON_EMPTY
IncludeBlocks: Preserve
-#IndentCaseBlocks: false
+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
@@ -91,15 +107,22 @@ PenaltyBreakFirstLessLess: 120
PenaltyBreakString: 1000
PenaltyBreakTemplateDeclaration: 10
PenaltyExcessCharacter: 1000000
+PenaltyIndentedWhitespace: 0
PenaltyReturnTypeOnItsOwnLine: 200
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
@@ -109,10 +132,13 @@ 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