chore: .clang-format updated

This commit is contained in:
Mateusz Pusz
2023-04-21 15:22:56 +01:00
parent 2bb8e4e739
commit 4673d89293

View File

@ -1,28 +1,50 @@
######################################################################################## ########################################################################################
# NOTE: At least clang-format-15 is needed to format the code of this project correctly # NOTE: At least clang-format-16 is needed to format the code of this project correctly
######################################################################################## ########################################################################################
--- ---
BasedOnStyle: Google BasedOnStyle: Google
--- ---
Language: Cpp Language: Cpp
AccessModifierOffset: -2 AccessModifierOffset: -2
# AlignAfterOpenBracket: Align # AlignAfterOpenBracket: Align
# AlignArrayOfStructures: None # AlignArrayOfStructures: None
# AlignConsecutiveMacros: None # AlignConsecutiveAssignments:
# AlignConsecutiveAssignments: None # Enabled: false
# AlignConsecutiveBitFields: None # AcrossEmptyLines: false
# AlignConsecutiveDeclarations: None # AcrossComments: false
# AlignCompound: false
# PadOperators: true
# AlignConsecutiveBitFields:
# Enabled: false
# AcrossEmptyLines: false
# AcrossComments: false
# AlignCompound: false
# PadOperators: false
# AlignConsecutiveDeclarations:
# Enabled: false
# AcrossEmptyLines: false
# AcrossComments: false
# AlignCompound: false
# PadOperators: false
# AlignConsecutiveMacros:
# Enabled: false
# AcrossEmptyLines: false
# AcrossComments: false
# AlignCompound: false
# PadOperators: false
# AlignEscapedNewlines: Left # AlignEscapedNewlines: Left
# AlignOperands: Align # AlignOperands: Align
# AlignTrailingComments: true # AlignTrailingComments:
# Kind: Always
# OverEmptyLines: 0
# AllowAllArgumentsOnNextLine: true # AllowAllArgumentsOnNextLine: true
# AllowAllParametersOfDeclarationOnNextLine: true # AllowAllParametersOfDeclarationOnNextLine: true
# AllowShortEnumsOnASingleLine: true
# AllowShortBlocksOnASingleLine: Never # AllowShortBlocksOnASingleLine: Never
# AllowShortCaseLabelsOnASingleLine: false # AllowShortCaseLabelsOnASingleLine: false
# AllowShortEnumsOnASingleLine: true
# AllowShortFunctionsOnASingleLine: All # AllowShortFunctionsOnASingleLine: All
# AllowShortLambdasOnASingleLine: All
# AllowShortIfStatementsOnASingleLine: WithoutElse # AllowShortIfStatementsOnASingleLine: WithoutElse
# AllowShortLambdasOnASingleLine: All
# AllowShortLoopsOnASingleLine: true # AllowShortLoopsOnASingleLine: true
# AlwaysBreakAfterDefinitionReturnType: None # AlwaysBreakAfterDefinitionReturnType: None
# AlwaysBreakAfterReturnType: None # AlwaysBreakAfterReturnType: None
@ -32,39 +54,40 @@ AccessModifierOffset: -2
# - __capability # - __capability
# BinPackArguments: true # BinPackArguments: true
# BinPackParameters: true # BinPackParameters: true
# BitFieldColonSpacing: Both
BraceWrapping: BraceWrapping:
# AfterCaseLabel: false # AfterCaseLabel: false
# AfterClass: false # AfterClass: false
# AfterControlStatement: Never # AfterControlStatement: Never
# AfterEnum: false # AfterEnum: false
AfterFunction: true # AfterExternBlock: false
# AfterNamespace: false AfterFunction: true
# AfterObjCDeclaration: false # AfterNamespace: false
# AfterStruct: false # AfterObjCDeclaration: false
# AfterUnion: false # AfterStruct: false
# AfterExternBlock: false # AfterUnion: false
# BeforeCatch: false # BeforeCatch: false
# BeforeElse: false # BeforeElse: false
# BeforeLambdaBody: false # BeforeLambdaBody: false
# BeforeWhile: false # BeforeWhile: false
# IndentBraces: false # IndentBraces: false
# SplitEmptyFunction: true # SplitEmptyFunction: true
SplitEmptyRecord: false SplitEmptyRecord: false
# SplitEmptyNamespace: true # SplitEmptyNamespace: true
# BreakAfterJavaFieldAnnotations: false
# BreakArrays: true
# BreakBeforeBinaryOperators: None # BreakBeforeBinaryOperators: None
# BreakBeforeConceptDeclarations: Always # BreakBeforeConceptDeclarations: Always
BreakBeforeBraces: Custom BreakBeforeBraces: Custom
# BreakBeforeInheritanceComma: false # BreakBeforeInheritanceComma: false
BreakInheritanceList: AfterColon BreakInheritanceList: AfterColon
# BreakBeforeTernaryOperators: true # BreakBeforeTernaryOperators: true
BreakConstructorInitializersBeforeComma: true
BreakConstructorInitializers: AfterColon BreakConstructorInitializers: AfterColon
# BreakAfterJavaFieldAnnotations: false # BreakInheritanceList: BeforeColon
# BreakStringLiterals: true # BreakStringLiterals: true
ColumnLimit: 120 ColumnLimit: 120
CommentPragmas: '^ NOLINT' CommentPragmas: "^ NOLINT"
# CommentPragmas: '^ IWYU pragma:' # CommentPragmas: '^ IWYU pragma:'
QualifierAlignment: Left
# CompactNamespaces: false # CompactNamespaces: false
# ConstructorInitializerIndentWidth: 4 # ConstructorInitializerIndentWidth: 4
ContinuationIndentWidth: 2 ContinuationIndentWidth: 2
@ -75,9 +98,6 @@ DerivePointerAlignment: false
# EmptyLineAfterAccessModifier: Never # EmptyLineAfterAccessModifier: Never
EmptyLineBeforeAccessModifier: Leave EmptyLineBeforeAccessModifier: Leave
# ExperimentalAutoDetectBinPacking: false # ExperimentalAutoDetectBinPacking: false
# PackConstructorInitializers: NextLine
# ConstructorInitializerAllOnOneLineOrOnePerLine: false
# AllowAllConstructorInitializersOnNextLine: true
# FixNamespaceComments: true # FixNamespaceComments: true
# ForEachMacros: # ForEachMacros:
# - foreach # - foreach
@ -85,26 +105,26 @@ EmptyLineBeforeAccessModifier: Leave
# - BOOST_FOREACH # - BOOST_FOREACH
# IfMacros: # IfMacros:
# - KJ_IF_MAYBE # - KJ_IF_MAYBE
IncludeBlocks: Merge IncludeBlocks: Merge
IncludeCategories: IncludeCategories:
- Regex: '^".*' - Regex: '^".*'
Priority: 1 Priority: 1
- Regex: '^".+/.*' - Regex: '^".+/.*'
Priority: 2 Priority: 2
- Regex: '^<.+/.*' - Regex: "^<.+/.*"
Priority: 3 Priority: 3
- Regex: '^<.*\.h>' - Regex: '^<.*\.h>'
Priority: 4 Priority: 4
- Regex: '^<.*' - Regex: "^<.*"
Priority: 5 Priority: 5
# IncludeIsMainRegex: '([-_](test|unittest))?$' # IncludeIsMainRegex: '([-_](test|unittest))?$'
# IncludeIsMainSourceRegex: '' # IncludeIsMainSourceRegex: ''
# IndentAccessModifiers: false # IndentAccessModifiers: false
# IndentCaseLabels: true
# IndentCaseBlocks: false # IndentCaseBlocks: false
# IndentCaseLabels: true
# IndentExternBlock: AfterExternBlock
# IndentGotoLabels: true # IndentGotoLabels: true
# IndentPPDirectives: None # IndentPPDirectives: None
# IndentExternBlock: AfterExternBlock
# IndentRequiresClause: true # IndentRequiresClause: true
# IndentWidth: 2 # IndentWidth: 2
# IndentWrappedFunctionNames: false # IndentWrappedFunctionNames: false
@ -123,6 +143,7 @@ MaxEmptyLinesToKeep: 2
# ObjCBreakBeforeNestedBlockParam: true # ObjCBreakBeforeNestedBlockParam: true
# ObjCSpaceAfterProperty: false # ObjCSpaceAfterProperty: false
# ObjCSpaceBeforeProtocolList: true # ObjCSpaceBeforeProtocolList: true
# PackConstructorInitializers: NextLine
# PenaltyBreakAssignment: 2 # PenaltyBreakAssignment: 2
# PenaltyBreakBeforeFirstCallParameter: 1 # PenaltyBreakBeforeFirstCallParameter: 1
# PenaltyBreakComment: 300 # PenaltyBreakComment: 300
@ -131,10 +152,11 @@ MaxEmptyLinesToKeep: 2
# PenaltyBreakString: 1000 # PenaltyBreakString: 1000
# PenaltyBreakTemplateDeclaration: 10 # PenaltyBreakTemplateDeclaration: 10
# PenaltyExcessCharacter: 1000000 # PenaltyExcessCharacter: 1000000
# PenaltyReturnTypeOnItsOwnLine: 200
# PenaltyIndentedWhitespace: 0 # PenaltyIndentedWhitespace: 0
# PenaltyReturnTypeOnItsOwnLine: 200
# PointerAlignment: Left # PointerAlignment: Left
# PPIndentWidth: -1 # PPIndentWidth: -1
QualifierAlignment: Left
# RawStringFormats: # RawStringFormats:
# - Language: Cpp # - Language: Cpp
# Delimiters: # Delimiters:
@ -168,7 +190,9 @@ MaxEmptyLinesToKeep: 2
# ReferenceAlignment: Pointer # ReferenceAlignment: Pointer
# ReflowComments: true # ReflowComments: true
# RemoveBracesLLVM: false # RemoveBracesLLVM: false
# RemoveSemicolon: false
# RequiresClausePosition: OwnLine # RequiresClausePosition: OwnLine
# RequiresExpressionIndentation: OuterScope
# SeparateDefinitionBlocks: Leave # SeparateDefinitionBlocks: Leave
# ShortNamespaceLines: 1 # ShortNamespaceLines: 1
# SortIncludes: CaseSensitive # SortIncludes: CaseSensitive
@ -177,6 +201,7 @@ MaxEmptyLinesToKeep: 2
# SpaceAfterCStyleCast: false # SpaceAfterCStyleCast: false
# SpaceAfterLogicalNot: false # SpaceAfterLogicalNot: false
SpaceAfterTemplateKeyword: false SpaceAfterTemplateKeyword: false
# SpaceAroundPointerQualifiers: Default
# SpaceBeforeAssignmentOperators: true # SpaceBeforeAssignmentOperators: true
# SpaceBeforeCaseColon: false # SpaceBeforeCaseColon: false
# SpaceBeforeCpp11BracedList: false # SpaceBeforeCpp11BracedList: false
@ -184,17 +209,17 @@ SpaceAfterTemplateKeyword: false
# SpaceBeforeInheritanceColon: true # SpaceBeforeInheritanceColon: true
# SpaceBeforeParens: ControlStatements # SpaceBeforeParens: ControlStatements
SpaceBeforeParensOptions: SpaceBeforeParensOptions:
# AfterControlStatements: true # AfterControlStatements: true
# AfterForeachMacros: true # AfterForeachMacros: true
# AfterFunctionDefinitionName: false # AfterFunctionDefinitionName: false
# AfterFunctionDeclarationName: false # AfterFunctionDeclarationName: false
# AfterIfMacros: true # AfterIfMacros: true
# AfterOverloadedOperator: false # AfterOverloadedOperator: false
AfterRequiresInClause: true AfterRequiresInClause: true
# AfterRequiresInExpression: false # AfterRequiresInExpression: false
# BeforeNonEmptyParentheses: false # BeforeNonEmptyParentheses: false
# SpaceAroundPointerQualifiers: Default
# SpaceBeforeRangeBasedForLoopColon: true # SpaceBeforeRangeBasedForLoopColon: true
# SpaceBeforeSquareBrackets: false
# SpaceInEmptyBlock: false # SpaceInEmptyBlock: false
# SpaceInEmptyParentheses: false # SpaceInEmptyParentheses: false
# SpacesBeforeTrailingComments: 2 # SpacesBeforeTrailingComments: 2
@ -207,9 +232,7 @@ SpaceBeforeParensOptions:
# Maximum: -1 # Maximum: -1
# SpacesInParentheses: false # SpacesInParentheses: false
# SpacesInSquareBrackets: false # SpacesInSquareBrackets: false
# SpaceBeforeSquareBrackets: false # Standard: Auto
# BitFieldColonSpacing: Both
Standard: Latest
# StatementAttributeLikeMacros: # StatementAttributeLikeMacros:
# - Q_EMIT # - Q_EMIT
# StatementMacros: # StatementMacros:
@ -219,9 +242,9 @@ Standard: Latest
# UseCRLF: false # UseCRLF: false
# UseTab: Never # UseTab: Never
# WhitespaceSensitiveMacros: # WhitespaceSensitiveMacros:
# - STRINGIZE
# - PP_STRINGIZE
# - BOOST_PP_STRINGIZE # - BOOST_PP_STRINGIZE
# - NS_SWIFT_NAME
# - CF_SWIFT_NAME # - CF_SWIFT_NAME
# - NS_SWIFT_NAME
# - PP_STRINGIZE
# - STRINGIZE
# ... # ...