56 lines
1.4 KiB
YAML
56 lines
1.4 KiB
YAML
BasedOnStyle: LLVM
|
|
|
|
# Indentation (Linux kernel style)
|
|
UseTab: Always
|
|
TabWidth: 8
|
|
IndentWidth: 8
|
|
ContinuationIndentWidth: 8
|
|
|
|
# Keep parameters on one line as much as possible
|
|
BinPackParameters: true
|
|
BinPackArguments: true
|
|
|
|
# Allow long lines (important!)
|
|
ColumnLimit: 0 # or set to something large like 120
|
|
|
|
# Prevent breaking after return type / before function name
|
|
AlwaysBreakAfterReturnType: None
|
|
AlwaysBreakAfterDefinitionReturnType: None
|
|
|
|
# Keep function declarations/definitions on one line if possible
|
|
PenaltyBreakBeforeFirstCallParameter: 1000000
|
|
PenaltyReturnTypeOnItsOwnLine: 1000000
|
|
|
|
# Braces: K&R style everywhere, INCLUDING functions (your modification)
|
|
BreakBeforeBraces: Attach
|
|
|
|
# Control specific brace wrapping behavior
|
|
BraceWrapping:
|
|
AfterFunction: false # <-- key change (same line for functions)
|
|
AfterControlStatement: false
|
|
AfterStruct: false
|
|
AfterEnum: false
|
|
AfterUnion: false
|
|
AfterClass: false
|
|
BeforeElse: false
|
|
|
|
# Spaces
|
|
SpaceBeforeParens: ControlStatements
|
|
SpaceInEmptyParentheses: false
|
|
|
|
# Pointer alignment (kernel prefers this style)
|
|
PointerAlignment: Right
|
|
|
|
# Keep simple statements compact
|
|
AllowShortIfStatementsOnASingleLine: false
|
|
AllowShortLoopsOnASingleLine: false
|
|
AllowShortFunctionsOnASingleLine: None
|
|
|
|
# For-loop style similar to kernel
|
|
AllowShortBlocksOnASingleLine: Never
|
|
|
|
# Don't align weirdly
|
|
AlignConsecutiveAssignments: false
|
|
AlignConsecutiveDeclarations: false
|
|
|
|
SortIncludes: CaseSensitive |