---
# Linux kernel coding style (Documentation/process/coding-style.rst), as in
# the kernel's own .clang-format, minus its list of kernel-only for_each macros.
#   - tabs, 8 wide; 80 columns
#   - function braces on their own line, all other braces on the same line
#   - "case" lined up with "switch"; includes kept in the order you write them
BasedOnStyle: LLVM
IndentWidth: 8
TabWidth: 8
UseTab: Always
ColumnLimit: 80
ContinuationIndentWidth: 8

BreakBeforeBraces: Custom
BraceWrapping:
  AfterFunction: true
  AfterControlStatement: false
  AfterEnum: false
  AfterStruct: false
  AfterUnion: false
  AfterExternBlock: false
  BeforeElse: false
  SplitEmptyFunction: true
  SplitEmptyRecord: true

AlignAfterOpenBracket: Align
AlignEscapedNewlines: Left
AlignOperands: true
AlignTrailingComments: false
AllowAllParametersOfDeclarationOnNextLine: false
AllowShortBlocksOnASingleLine: Never
AllowShortCaseLabelsOnASingleLine: false
AllowShortFunctionsOnASingleLine: None
AllowShortIfStatementsOnASingleLine: Never
AllowShortLoopsOnASingleLine: false
AlwaysBreakBeforeMultilineStrings: false
BinPackArguments: true
BinPackParameters: true
BreakBeforeBinaryOperators: None
BreakBeforeTernaryOperators: false
Cpp11BracedListStyle: false
IncludeBlocks: Preserve
IndentCaseLabels: false
IndentGotoLabels: false
KeepEmptyLinesAtTheStartOfBlocks: false
MaxEmptyLinesToKeep: 1
PointerAlignment: Right
ReflowComments: false
SortIncludes: Never
SpaceAfterCStyleCast: false
SpaceBeforeParens: ControlStatementsExceptControlMacros

PenaltyBreakAssignment: 10
PenaltyBreakBeforeFirstCallParameter: 30
PenaltyBreakComment: 10
PenaltyBreakFirstLessLess: 0
PenaltyBreakString: 10
PenaltyExcessCharacter: 100
PenaltyReturnTypeOnItsOwnLine: 60
