meta: set up clang-format

Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: I82153db16a9b18a901faf7095a2a26d26a6a6964
This commit is contained in:
raf 2026-04-13 09:24:03 +03:00
commit fa767ddef9
Signed by: NotAShelf
GPG key ID: 29D95B64378DB4BF

39
.clang-format Normal file
View file

@ -0,0 +1,39 @@
---
Language: Cpp
BasedOnStyle: LLVM
IndentWidth: 2
TabWidth: 2
UseTab: Never
ColumnLimit: 100
AllowShortIfStatementsOnASingleLine: false
BreakBeforeBraces: Attach
IndentCaseLabels: true
IndentGotoLabels: true
IndentPPDirectives: AfterHash
SortIncludes: true
SpaceAfterCStyleCast: true
SpacesInParentheses: false
SpacesInSquareBrackets: false
SpacesInAngles: false
SpaceBeforeParens: ControlStatements
PointerAlignment: Left
AlignConsecutiveAssignments: true
AlignConsecutiveDeclarations: true
AlignArrayOfStructures: Left
AlignTrailingComments: true
AllowShortBlocksOnASingleLine: false
AlwaysBreakAfterReturnType: None
AlwaysBreakTemplateDeclarations: false
BinPackArguments: true
BinPackParameters: true
Cpp11BracedListStyle: true
DerivePointerAlignment: false
FixNamespaceComments: true
KeepEmptyLinesAtTheStartOfBlocks: false
MaxEmptyLinesToKeep: 1
NamespaceIndentation: All
ReflowComments: true
SortUsingDeclarations: true
SpacesBeforeTrailingComments: 2
Standard: Cpp11
...