# C++ formatting for OpenBeach (clang-format 21.x; python tools/format.py, docs/workflow/code-style.md).
# Tuned to the dominant style of the code base: 4 spaces, 140 columns, function braces on their own line.
BasedOnStyle: LLVM
IndentWidth: 4
ColumnLimit: 140
AccessModifierOffset: -4
BreakBeforeBraces: Custom
BraceWrapping:
  AfterFunction: true
  AfterClass: false
  AfterStruct: false
  AfterEnum: false
  AfterNamespace: false
  AfterControlStatement: Never
  BeforeElse: false
  SplitEmptyFunction: false
PointerAlignment: Left
AllowShortFunctionsOnASingleLine: Inline
AllowShortIfStatementsOnASingleLine: WithoutElse
AllowShortCaseLabelsOnASingleLine: true
AllowShortLoopsOnASingleLine: true
AllowShortBlocksOnASingleLine: Empty
SortIncludes: Never
ReflowComments: false
NamespaceIndentation: None
FixNamespaceComments: true
IndentCaseLabels: false
AlignAfterOpenBracket: DontAlign
ContinuationIndentWidth: 8
BinPackArguments: true
BinPackParameters: true
AlignTrailingComments: false
AlignConsecutiveAssignments: false
AlignOperands: DontAlign
BreakConstructorInitializers: BeforeColon
PackConstructorInitializers: NextLine
SpacesBeforeTrailingComments: 1
Cpp11BracedListStyle: true
IndentPPDirectives: None
MaxEmptyLinesToKeep: 1
KeepEmptyLinesAtTheStartOfBlocks: false
InsertNewlineAtEOF: true
SpaceAfterTemplateKeyword: false
