-
Notifications
You must be signed in to change notification settings - Fork 300
/
.clang-format
34 lines (34 loc) · 1.29 KB
/
.clang-format
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# clang-format script for daos that most closely matches our coding style.
# Tested on EL 8, and uses version 12 so check for that in
# site_scons/site_tools/extra/extra.py
# Versions up to 14.0.4 had a bug where generated code could be wrongly indented
# so this should only be used for formatting code with 14.0.5 or above. Versions prior to that
# will have whitespace errors.
# https://github.com/llvm/llvm-project/issues/55407
BasedOnStyle: LLVM
IndentWidth: 8
UseTab: ForContinuationAndIndentation
BreakBeforeBraces: Linux
AllowShortIfStatementsOnASingleLine: false
IndentCaseLabels: false
ForEachMacros: ['d_list_for_each_entry',
'd_list_for_each_safe',
'd_list_for_each_entry_safe',
'd_list_for_each_entry_reverse',
'evt_ent_array_for_each']
PointerAlignment: Right
AlignTrailingComments: true
ColumnLimit: 100
SortIncludes: false
AlwaysBreakAfterReturnType: All
IndentGotoLabels: false
AlignConsecutiveDeclarations: AcrossEmptyLinesAndComments
AlignConsecutiveMacros: AcrossEmptyLinesAndComments
AlignConsecutiveAssignments: Consecutive
AlignConsecutiveBitFields: AcrossEmptyLinesAndComments
SpaceBeforeParens: ControlStatementsExceptForEachMacros
KeepEmptyLinesAtTheStartOfBlocks: false
MaxEmptyLinesToKeep: 1
---
Language: Json
IndentWidth: 2