74 lines
1.7 KiB
YAML
74 lines
1.7 KiB
YAML
# Project-wide C++ formatting (C++ latest / Visual Studio + clang-format)
|
|
BasedOnStyle: Mozilla
|
|
Language: Cpp
|
|
|
|
# General layout
|
|
ColumnLimit: 0
|
|
IndentWidth: 2
|
|
ContinuationIndentWidth: 2
|
|
AlwaysBreakBeforeMultilineStrings: false
|
|
TabWidth: 2
|
|
UseTab: Never
|
|
|
|
# Braces/style (matches your current Allman-like style)
|
|
BreakBeforeBraces: Allman
|
|
#AllowShortIfStatementsOnASingleLine: Never
|
|
#AllowShortBlocksOnASingleLine: Never
|
|
# AllowShortFunctionsOnASingleLine: None
|
|
AllowShortFunctionsOnASingleLine: Inline
|
|
AllowShortLoopsOnASingleLine: false
|
|
#AllowShortLambdasOnASingleLine: None
|
|
|
|
# Lambdas
|
|
LambdaBodyIndentation: Signature
|
|
|
|
# Wrapping / argument formatting
|
|
# BinPackArguments: false
|
|
# BinPackParameters: false
|
|
AllowAllParametersOfDeclarationOnNextLine: false
|
|
# AlignAfterOpenBracket: DontAlign
|
|
AlignAfterOpenBracket: Align
|
|
|
|
# Pointers/references
|
|
PointerAlignment: Right
|
|
ReferenceAlignment: Right
|
|
|
|
# Namespaces
|
|
FixNamespaceComments: true
|
|
|
|
# Includes
|
|
SortIncludes: CaseSensitive
|
|
IncludeBlocks: Regroup
|
|
|
|
# Keep comments readable
|
|
ReflowComments: true
|
|
|
|
# Breaking
|
|
BreakAfterReturnType: None
|
|
AlwaysBreakAfterDefinitionReturnType: None
|
|
BreakConstructorInitializersBeforeComma: false
|
|
BreakBeforeTernaryOperators: true
|
|
|
|
# Spacing
|
|
SpaceBeforeParens: ControlStatements
|
|
SpacesInParentheses: false
|
|
SpacesInSquareBrackets: false
|
|
SpaceInEmptyParentheses: false
|
|
SpacesBeforeTrailingComments: 5
|
|
AccessModifierOffset: 0
|
|
AlignConsecutiveAssignments: true
|
|
AlignConsecutiveDeclarations: true
|
|
AlignEscapedNewlines: Left
|
|
AlignOperands: true
|
|
AlignTrailingComments: true
|
|
AllowShortCaseLabelsOnASingleLine: false
|
|
IndentCaseLabels: true
|
|
IndentPPDirectives: AfterHash
|
|
NamespaceIndentation: None
|
|
|
|
# Sorting
|
|
SortUsingDeclarations: Lexicographic
|
|
|
|
# C++ specifics
|
|
Standard: Latest
|