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