forked from Spirent/openperf
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.clang-format
65 lines (61 loc) · 1.51 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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
#
# Clang-Format configuration for OpenPerf code
#
BasedOnStyle: LLVM
---
Language: Cpp
AccessModifierOffset: -4 # Relative to standard indent width
AlignOperands: true
AllowShortBlocksOnASingleLine: true
AllowShortIfStatementsOnASingleLine: true
AllowShortLoopsOnASingleLine: true
AlwaysBreakBeforeMultilineStrings: false
AlwaysBreakTemplateDeclarations: MultiLine
BinPackArguments: false
BinPackParameters: false
# Picky, picky, picky... - Hermey
BreakBeforeBraces: Custom
BraceWrapping:
AfterClass: true
AfterFunction: true
AfterStruct: true
AfterUnion: true
SplitEmptyFunction: false
SplitEmptyRecord: false
SplitEmptyNamespace: false
BreakBeforeBinaryOperators: NonAssignment
BreakConstructorInitializers: BeforeComma
BreakInheritanceList: BeforeComma
DerivePointerAlignment: false
ForEachMacros:
# LwIP
- NETIF_FOREACH
# DPDK
- RTE_ETH_FOREACH_DEV
- RTE_ETH_FOREACH_DEV_OF
- RTE_ETH_FOREACH_DEV_OWNED_BY
- RTE_ETH_FOREACH_DEV_SIBLING
- RTE_ETH_FOREACH_MATCHING_DEV
- RTE_ETH_FOREACH_VALID_DEV
- RTE_LCORE_FOREACH
- RTE_LCORE_FOREACH_SLAVE
# bsd_tree.h
- SPLAY_FOREACH
- RB_FOREACH
- RB_FOREACH_FROM
- RB_FOREACH_SAFE
- RB_FOREACH_REVERSE
- RB_FOREACH_REVERSE_FROM
- RB_FOREACH_REVERSE_SAFE
# queue.h
- LIST_FOREACH
- SLIST_FOREACH
- STAILQ_FOREACH
- TAILQ_FOREACH
- TAILQ_FOREACH_REVERSE
IndentCaseLabels: false
PointerAlignment: Left
IndentWidth: 4
SortIncludes: false # Enabling this can break things!
# Need a clang-format version past 8 to support newer standards
Standard: Cpp11