1
0
Fork 0

update clang-format config to 14

This commit is contained in:
tastytea 2022-10-30 04:28:45 +01:00
parent c123a35457
commit bb31cbe10d
Signed by: tastytea
SSH Key Fingerprint: SHA256:FBkvrOlhq5use1XEttyUGT4bUTDVA1ar9SgIc9P03cM
1 changed files with 9 additions and 4 deletions

View File

@ -2,8 +2,8 @@
# #
# SPDX-License-Identifier: CC0-1.0 # SPDX-License-Identifier: CC0-1.0
# Written for clang-format 13. # Written for clang-format 14.
# https://releases.llvm.org/13.0.0/tools/clang/docs/ClangFormatStyleOptions.html # https://releases.llvm.org/14.0.0/tools/clang/docs/ClangFormatStyleOptions.html
--- ---
DisableFormat: false DisableFormat: false
Language: Cpp Language: Cpp
@ -41,6 +41,7 @@ BreakBeforeBraces: Attach
BreakBeforeConceptDeclarations: true BreakBeforeConceptDeclarations: true
BreakBeforeTernaryOperators: true BreakBeforeTernaryOperators: true
BreakConstructorInitializers: BeforeComma BreakConstructorInitializers: BeforeComma
PackConstructorInitializers: Never # 14
BreakInheritanceList: BeforeComma BreakInheritanceList: BeforeComma
BreakStringLiterals: true BreakStringLiterals: true
ColumnLimit: 80 ColumnLimit: 80
@ -58,7 +59,7 @@ FixNamespaceComments: true
# IfMacros: ['IF'] # IfMacros: ['IF']
IncludeBlocks: Regroup IncludeBlocks: Regroup
IncludeCategories: # stdlib headers into own group. IncludeCategories: # stdlib headers into own group.
- Regex: '^[^\.]+$' - Regex: '^[^\.Q]+$'
Priority: 4 Priority: 4
IndentAccessModifiers: false IndentAccessModifiers: false
IndentCaseBlocks: false IndentCaseBlocks: false
@ -66,9 +67,10 @@ IndentCaseLabels: true
IndentExternBlock: NoIndent IndentExternBlock: NoIndent
IndentGotoLabels: false IndentGotoLabels: false
IndentPPDirectives: AfterHash IndentPPDirectives: AfterHash
IndentRequires: true # Not sure yet IndentRequires: true # IndentRequiresClause beginning with 15
IndentWidth: 4 IndentWidth: 4
IndentWrappedFunctionNames: false IndentWrappedFunctionNames: false
# InsertBraces: true # 15
InsertTrailingCommas: None InsertTrailingCommas: None
KeepEmptyLinesAtTheStartOfBlocks: true KeepEmptyLinesAtTheStartOfBlocks: true
LambdaBodyIndentation: Signature LambdaBodyIndentation: Signature
@ -83,17 +85,20 @@ PenaltyBreakBeforeFirstCallParameter: 300
# PenaltyBreakFirstLessLess: 120 # PenaltyBreakFirstLessLess: 120
# PenaltyBreakString: 1000 # PenaltyBreakString: 1000
# PenaltyBreakTemplateDeclaration: 10 # PenaltyBreakTemplateDeclaration: 10
PenaltyBreakOpenParenthesis: 50 # 14
# PenaltyExcessCharacter: 1000000 # PenaltyExcessCharacter: 1000000
# PenaltyIndentedWhitespace: # PenaltyIndentedWhitespace:
PenaltyReturnTypeOnItsOwnLine: 100 PenaltyReturnTypeOnItsOwnLine: 100
PointerAlignment: Right PointerAlignment: Right
ReflowComments: true ReflowComments: true
SeparateDefinitionBlocks: Always # 14
SortIncludes: CaseInsensitive SortIncludes: CaseInsensitive
SortUsingDeclarations: true SortUsingDeclarations: true
SpaceAfterCStyleCast: false SpaceAfterCStyleCast: false
SpaceAfterLogicalNot: false SpaceAfterLogicalNot: false
SpaceAfterTemplateKeyword: false SpaceAfterTemplateKeyword: false
SpaceAroundPointerQualifiers: Default SpaceAroundPointerQualifiers: Default
QualifierAlignment: Left # 14
SpaceBeforeAssignmentOperators: true SpaceBeforeAssignmentOperators: true
SpaceBeforeCaseColon: false SpaceBeforeCaseColon: false
SpaceBeforeCpp11BracedList: false SpaceBeforeCpp11BracedList: false