try using clang format to make auto-formatting work well

This commit is contained in:
Carsten Haitzler 2023-09-27 11:05:58 +01:00
parent 0f4b9239d9
commit dcd213ee68
1 changed files with 28 additions and 0 deletions

28
.clang-format Normal file
View File

@ -0,0 +1,28 @@
Language: Cpp
BasedOnStyle: GNU
UseTab: Never
IndentWidth: 2
ContinuationIndentWidth: 2
ColumnLimit: 80
AlignAfterOpenBracket: Align
AlignArrayOfStructures: Left
AlignConsecutiveAssignments: Consecutive
AlignConsecutiveBitFields: Consecutive
AlignConsecutiveMacros:
Enabled: True
AcrossEmptyLines: False
AcrossComments: True
AlignConsecutiveDeclarations: Consecutive
AlignEscapedNewlines: Left
AlignOperands: Align
AllowAllParametersOfDeclarationOnNextLine: True
AllowShortIfStatementsOnASingleLine: AllIfsAndElse
AllowShortLoopsOnASingleLine: True
AlwaysBreakAfterReturnType: AllDefinitions
IndentGotoLabels: False
SpaceAfterCStyleCast: False
SpaceAfterLogicalNot: False
SpaceBeforeAssignmentOperators: True
SpaceBeforeParens: ControlStatements
IncludeBlocks: Preserve
SortIncludes: Never