Update .clang-format..

This commit is contained in:
tastytea 2020-10-30 21:43:19 +01:00
parent a83a11d8e2
commit f3b97151f1
Signed by: tastytea
GPG Key ID: CFC39497F1B26E07
1 changed files with 20 additions and 9 deletions

View File

@ -8,25 +8,27 @@ Language: Cpp
AccessModifierOffset: -4 AccessModifierOffset: -4
AlignAfterOpenBracket: Align AlignAfterOpenBracket: Align
AlignConsecutiveAssignments: false AlignConsecutiveAssignments: false
# AlignConsecutiveBitFields: false # clang-format 11
AlignConsecutiveDeclarations: false AlignConsecutiveDeclarations: false
AlignConsecutiveMacros: false AlignConsecutiveMacros: false
AlignEscapedNewlines: DontAlign AlignEscapedNewlines: DontAlign
AlignOperands: true AlignOperands: true # clang-format 11: Align
AlignTrailingComments: true AlignTrailingComments: true
AllowAllArgumentsOnNextLine: false AllowAllArgumentsOnNextLine: false
AllowAllConstructorInitializersOnNextLine: false AllowAllConstructorInitializersOnNextLine: false
AllowAllParametersOfDeclarationOnNextLine: false AllowAllParametersOfDeclarationOnNextLine: false
AllowShortBlocksOnASingleLine: Empty AllowShortBlocksOnASingleLine: Empty
AllowShortCaseLabelsOnASingleLine: false AllowShortCaseLabelsOnASingleLine: false
# AllowShortEnumsOnASingleLine: false # clang-format 11
AllowShortFunctionsOnASingleLine: Empty AllowShortFunctionsOnASingleLine: Empty
AllowShortIfStatementsOnASingleLine: Never AllowShortIfStatementsOnASingleLine: Never
AllowShortLambdasOnASingleLine: Inline AllowShortLambdasOnASingleLine: Inline
AllowShortLoopsOnASingleLine: false AllowShortLoopsOnASingleLine: false
AlwaysBreakAfterReturnType: None AlwaysBreakAfterReturnType: None
AlwaysBreakBeforeMultilineStrings: false AlwaysBreakBeforeMultilineStrings: false
AlwaysBreakTemplateDeclarations: MultiLine AlwaysBreakTemplateDeclarations: Yes
BinPackArguments: true # TODO: Not sure what I prefer. BinPackArguments: true
BinPackParameters: true # ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ BinPackParameters: true
BraceWrapping: # If BreakBeforeBraces is set to Custom. BraceWrapping: # If BreakBeforeBraces is set to Custom.
AfterCaseLabel: true AfterCaseLabel: true
AfterClass: true AfterClass: true
@ -40,6 +42,7 @@ BraceWrapping: # If BreakBeforeBraces is set to Custom.
BeforeCatch: true BeforeCatch: true
BeforeElse: true BeforeElse: true
# BeforeLambdaBody: true # clang-format 11 # BeforeLambdaBody: true # clang-format 11
# BeforeWhile: true # clang-format 11
IndentBraces: false IndentBraces: false
SplitEmptyFunction: false SplitEmptyFunction: false
SplitEmptyRecord: false SplitEmptyRecord: false
@ -65,9 +68,13 @@ ForEachMacros:
- RANGES_FOR - RANGES_FOR
- Q_FOREACH - Q_FOREACH
- BOOST_FOREACH - BOOST_FOREACH
IncludeBlocks: Preserve IncludeBlocks: Regroup
# IndentCaseBlocks: false IncludeCategories: # stdlib headers into own group.
- Regex: '^[^\.]+$'
Priority: 4
# IndentCaseBlocks: false # clang-format 11
IndentCaseLabels: false IndentCaseLabels: false
# IndentExternBlock: NoIndent # clang-format 11
IndentGotoLabels: false IndentGotoLabels: false
IndentPPDirectives: AfterHash IndentPPDirectives: AfterHash
IndentWidth: 4 IndentWidth: 4
@ -78,8 +85,8 @@ KeepEmptyLinesAtTheStartOfBlocks: true
MaxEmptyLinesToKeep: 1 MaxEmptyLinesToKeep: 1
NamespaceIndentation: None NamespaceIndentation: None
# NamespaceMacros: 'string' # NamespaceMacros: 'string'
# PenaltyBreakAssignment: 2 PenaltyBreakAssignment: 250
# PenaltyBreakBeforeFirstCallParameter: 19 PenaltyBreakBeforeFirstCallParameter: 300
# PenaltyBreakComment: 300 # PenaltyBreakComment: 300
# PenaltyBreakFirstLessLess: 120 # PenaltyBreakFirstLessLess: 120
# PenaltyBreakString: 1000 # PenaltyBreakString: 1000
@ -87,10 +94,12 @@ NamespaceIndentation: None
# PenaltyExcessCharacter: 1000000 # PenaltyExcessCharacter: 1000000
# PenaltyReturnTypeOnItsOwnLine: 60 # PenaltyReturnTypeOnItsOwnLine: 60
PointerAlignment: Right PointerAlignment: Right
# RawStringFormats: # <YAML>
ReflowComments: true ReflowComments: true
SortIncludes: true SortIncludes: true
SortUsingDeclarations: true SortUsingDeclarations: true
SpaceAfterCStyleCast: false SpaceAfterCStyleCast: false
SpaceAfterLogicalNot: false
SpaceAfterTemplateKeyword: false SpaceAfterTemplateKeyword: false
SpaceBeforeAssignmentOperators: true SpaceBeforeAssignmentOperators: true
SpaceBeforeCpp11BracedList: false SpaceBeforeCpp11BracedList: false
@ -102,7 +111,7 @@ SpaceBeforeSquareBrackets: false
SpaceInEmptyBlock: false SpaceInEmptyBlock: false
SpaceInEmptyParentheses: false SpaceInEmptyParentheses: false
SpacesBeforeTrailingComments: 1 SpacesBeforeTrailingComments: 1
SpacesInAngles: false SpacesInAngles: false
SpacesInCStyleCastParentheses: false SpacesInCStyleCastParentheses: false
SpacesInConditionalStatement: false SpacesInConditionalStatement: false
SpacesInContainerLiterals: false SpacesInContainerLiterals: false
@ -116,5 +125,7 @@ TabWidth: 4
# TypenameMacros: # TypenameMacros:
# - STACK_OF # - STACK_OF
# - LIST # - LIST
UseCRLF: false
UseTab: Never UseTab: Never
# WhitespaceSensitiveMacros: ['string', 'string'] # clang-format 11
... ...