formatting: add .clang-format

This commit is contained in:
Alex Denes 2026-04-21 14:11:09 +00:00
parent a2d03cf618
commit 1feb41da8e
No known key found for this signature in database
GPG key ID: F92BA85F61F4C173
6 changed files with 415 additions and 294 deletions

30
.clang-format Normal file
View file

@ -0,0 +1,30 @@
Language: C
BasedOnStyle: LLVM
ColumnLimit: 100
IndentWidth: 8
TabWidth: 8
UseTab: ForIndentation
ContinuationIndentWidth: 8
BreakBeforeBraces: Linux
BreakAfterReturnType: AllDefinitions
AlwaysBreakAfterReturnType: AllDefinitions
PointerAlignment: Right
IndentCaseLabels: false
AlignAfterOpenBracket: DontAlign
BinPackParameters: true
BinPackArguments: true
AllowShortFunctionsOnASingleLine: None
AllowShortBlocksOnASingleLine: Never
AllowShortIfStatementsOnASingleLine: Never
AllowShortLoopsOnASingleLine: false
AllowShortCaseLabelsOnASingleLine: false
SpaceBeforeParens: ControlStatements
SpaceAfterCStyleCast: false
AlignConsecutiveMacros:
Enabled: true
AcrossEmptyLines: false
AcrossComments: false
AlignTrailingComments: false
AlignArrayOfStructures: Left
SortIncludes: true
IncludeBlocks: Regroup