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