Update .clang-format to 13, change brace wrapping style
This commit is contained in:
parent
dbb41dd29e
commit
96cfa07a04
|
@ -1,12 +1,13 @@
|
|||
# -*- mode: yaml -*-
|
||||
# Written for clang-format 12.
|
||||
# https://releases.llvm.org/12.0.0/tools/clang/docs/ClangFormatStyleOptions.html
|
||||
# Written for clang-format 13.
|
||||
# https://releases.llvm.org/13.0.0/tools/clang/docs/ClangFormatStyleOptions.html
|
||||
---
|
||||
DisableFormat: false
|
||||
Language: Cpp
|
||||
|
||||
AccessModifierOffset: -4
|
||||
AlignAfterOpenBracket: Align
|
||||
AlignArrayOfStructures: Left
|
||||
AlignConsecutiveAssignments: None
|
||||
AlignConsecutiveBitFields: None
|
||||
AlignConsecutiveDeclarations: None
|
||||
|
@ -27,36 +28,20 @@ AllowShortLoopsOnASingleLine: false
|
|||
AlwaysBreakAfterReturnType: None
|
||||
AlwaysBreakBeforeMultilineStrings: false
|
||||
AlwaysBreakTemplateDeclarations: Yes
|
||||
# AttributeMacros: ['__capability', '__output', '__ununsed']
|
||||
BinPackArguments: true
|
||||
BinPackParameters: true
|
||||
BitFieldColonSpacing: Both
|
||||
BraceWrapping: # If BreakBeforeBraces is set to Custom.
|
||||
AfterCaseLabel: true
|
||||
AfterClass: true
|
||||
AfterControlStatement: Always
|
||||
AfterEnum: true
|
||||
AfterFunction: true
|
||||
AfterNamespace: true
|
||||
AfterStruct: true
|
||||
AfterUnion: true
|
||||
AfterExternBlock: true
|
||||
BeforeCatch: true
|
||||
BeforeElse: true
|
||||
BeforeLambdaBody: true
|
||||
BeforeWhile: true
|
||||
IndentBraces: false
|
||||
SplitEmptyFunction: false
|
||||
SplitEmptyRecord: false
|
||||
SplitEmptyNamespace: false
|
||||
# BraceWrapping: # If BreakBeforeBraces is set to Custom.
|
||||
BreakBeforeBinaryOperators: NonAssignment
|
||||
BreakBeforeBraces: Custom
|
||||
BreakBeforeBraces: Attach
|
||||
BreakBeforeConceptDeclarations: true
|
||||
BreakBeforeTernaryOperators: true
|
||||
BreakConstructorInitializers: BeforeComma
|
||||
BreakInheritanceList: BeforeComma
|
||||
BreakStringLiterals: true
|
||||
ColumnLimit: 80
|
||||
# CommentPragmas: 'regex'
|
||||
# CommentPragmas:
|
||||
CompactNamespaces: false
|
||||
ConstructorInitializerAllOnOneLineOrOnePerLine: false
|
||||
ConstructorInitializerIndentWidth: 4
|
||||
|
@ -66,15 +51,13 @@ DeriveLineEnding: true
|
|||
DerivePointerAlignment: false
|
||||
EmptyLineBeforeAccessModifier: LogicalBlock
|
||||
FixNamespaceComments: true
|
||||
ForEachMacros:
|
||||
- FOREACH
|
||||
- RANGES_FOR
|
||||
- Q_FOREACH
|
||||
- BOOST_FOREACH
|
||||
# ForEachMacros: ['FOREACH', 'RANGES_FOR', 'Q_FOREACH', 'BOOST_FOREACH' ]
|
||||
# IfMacros: ['IF']
|
||||
IncludeBlocks: Regroup
|
||||
IncludeCategories: # stdlib headers into own group.
|
||||
- Regex: '^[^\.]+$'
|
||||
Priority: 4
|
||||
IndentAccessModifiers: false
|
||||
IndentCaseBlocks: false
|
||||
IndentCaseLabels: false
|
||||
IndentExternBlock: NoIndent
|
||||
|
@ -83,12 +66,14 @@ IndentPPDirectives: AfterHash
|
|||
IndentRequires: true # Not sure yet
|
||||
IndentWidth: 4
|
||||
IndentWrappedFunctionNames: false
|
||||
InsertTrailingCommas: None
|
||||
KeepEmptyLinesAtTheStartOfBlocks: true
|
||||
# MacroBlockBegin: 'string'
|
||||
# MacroBlockEnd: 'string'
|
||||
LambdaBodyIndentation: Signature
|
||||
# MacroBlockBegin:
|
||||
# MacroBlockEnd:
|
||||
MaxEmptyLinesToKeep: 1
|
||||
NamespaceIndentation: None
|
||||
# NamespaceMacros: 'string'
|
||||
# NamespaceMacros:
|
||||
PenaltyBreakAssignment: 250
|
||||
PenaltyBreakBeforeFirstCallParameter: 300
|
||||
# PenaltyBreakComment: 300
|
||||
|
@ -99,15 +84,15 @@ PenaltyBreakBeforeFirstCallParameter: 300
|
|||
# PenaltyIndentedWhitespace:
|
||||
PenaltyReturnTypeOnItsOwnLine: 100
|
||||
PointerAlignment: Right
|
||||
# RawStringFormats: # <YAML>
|
||||
ReflowComments: true
|
||||
SortIncludes: true
|
||||
SortIncludes: CaseInsensitive
|
||||
SortUsingDeclarations: true
|
||||
SpaceAfterCStyleCast: false
|
||||
SpaceAfterLogicalNot: false
|
||||
SpaceAfterTemplateKeyword: false
|
||||
SpaceAroundPointerQualifiers: Default
|
||||
SpaceBeforeAssignmentOperators: true
|
||||
SpaceBeforeCaseColon: false
|
||||
SpaceBeforeCpp11BracedList: false
|
||||
SpaceBeforeCtorInitializerColon: true
|
||||
SpaceBeforeInheritanceColon: true
|
||||
|
@ -124,15 +109,11 @@ SpacesInContainerLiterals: false
|
|||
SpacesInParentheses: false
|
||||
SpacesInSquareBrackets: false
|
||||
Standard: Auto
|
||||
# StatementAttributeLikeMacros:
|
||||
# StatementMacros:
|
||||
# - Q_UNUSED
|
||||
# - QT_REQUIRE_VERSION
|
||||
StatementAttributeLikeMacros: [emit]
|
||||
# StatementMacros: [Q_UNUSED, QT_REQUIRE_VERSION]
|
||||
TabWidth: 4
|
||||
# TypenameMacros:
|
||||
# - STACK_OF
|
||||
# - LIST
|
||||
# TypenameMacros: ['STACK_OF', 'LIST']
|
||||
UseCRLF: false
|
||||
UseTab: Never
|
||||
# WhitespaceSensitiveMacros: ['string', 'string']
|
||||
# WhitespaceSensitiveMacros: ['STRINGIZE', 'PP_STRINGIZE']
|
||||
...
|
||||
|
|
Loading…
Reference in New Issue
Block a user