-
Notifications
You must be signed in to change notification settings - Fork 63
/
Copy path.clang-format
156 lines (155 loc) · 4.19 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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
# SPDX-FileCopyrightText: 2024 EfficiOS Inc.
#
# SPDX-License-Identifier: MIT
# For clang-format 13
AccessModifierOffset: -4
AlignAfterOpenBracket: Align
AlignArrayOfStructures: None
AlignConsecutiveAssignments: None
AlignConsecutiveDeclarations: None
AlignConsecutiveMacros: Consecutive
AlignEscapedNewlines: Right
AlignOperands: Align
AlignTrailingComments: true
AllowAllArgumentsOnNextLine: false
AllowAllConstructorInitializersOnNextLine: false
AllowAllParametersOfDeclarationOnNextLine: false
AllowShortBlocksOnASingleLine: Never
AllowShortCaseLabelsOnASingleLine: false
AllowShortEnumsOnASingleLine: false
AllowShortFunctionsOnASingleLine: None
AllowShortIfStatementsOnASingleLine: Never
AllowShortLambdasOnASingleLine: None
AllowShortLoopsOnASingleLine: false
AlwaysBreakAfterReturnType: None
AlwaysBreakBeforeMultilineStrings: false
AlwaysBreakTemplateDeclarations: Yes
AttributeMacros: [
'_BT_LOG_PRINTFLIKE',
'ARGPAR_HIDDEN',
'BT_ASSERT_COND_DEV_FUNC',
'BT_ASSERT_DBG_FUNC',
'BT_CTF_ASSERT_PRE_FUNC',
'BT_EXTERN_C',
'BT_HIDDEN',
'SWIGEXPORT',
'SWIGUNUSED',
'YY_ATTRIBUTE_PURE',
'YY_ATTRIBUTE_UNUSED',
'yynoreturn',
]
BinPackArguments: true
BinPackParameters: true
BraceWrapping:
AfterCaseLabel: true
AfterClass: true
AfterControlStatement: Never
AfterEnum: true
AfterFunction: true
AfterNamespace: false
AfterStruct: true
AfterUnion: true
AfterExternBlock: false
BeforeCatch: false
BeforeElse: false
BeforeLambdaBody: false
BeforeWhile: false
SplitEmptyFunction: true
SplitEmptyRecord: true
SplitEmptyNamespace: true
BreakBeforeBinaryOperators: None
BreakBeforeBraces: Custom
BreakBeforeTernaryOperators: false
BreakConstructorInitializers: AfterColon
BreakInheritanceList: AfterColon
BreakStringLiterals: false
ColumnLimit: 100
CompactNamespaces: false
ConstructorInitializerAllOnOneLineOrOnePerLine: false
ConstructorInitializerIndentWidth: 4
ContinuationIndentWidth: 4
Cpp11BracedListStyle: true
DeriveLineEnding: false
DerivePointerAlignment: false
DisableFormat: false
EmptyLineBeforeAccessModifier: Always
FixNamespaceComments: true
ForEachMacros: [
'bt_list_for_each',
'bt_list_for_each_entry',
'bt_list_for_each_entry_reverse',
'bt_list_for_each_entry_safe',
'bt_list_for_each_prev',
'bt_list_for_each_prev_safe',
]
IncludeBlocks: Regroup
IncludeCategories:
# Babeltrace 2 public headers
- Regex: '^<babeltrace2/.+>$'
Priority: 3
# System C headers
- Regex: '^<.+\.h>$'
Priority: 2
# System C++ headers
- Regex: '^<.+>$'
Priority: 1
# Logging headers
- Regex: '^"(logging\.hpp|logging/comp-logging\.h|logging/log\.h)"$'
Priority: 4
# Common headers
- Regex: '^"(argpar|autodisc|common|compat|cpp-common|ctfser|fd-cache|param-parse|py-common|logging|string-format)/.+"$'
Priority: 5
# Plugins common headers
- Regex: '^"plugins/common/.+"$'
Priority: 6
# tap header file
- Regex: '^"(tap/)?tap\.h"$'
Priority: 8
# The rest (local headers)
- Regex: '.+'
Priority: 7
IncludeIsMainRegex: "please_dont_do_that"
IndentAccessModifiers: false
IndentCaseBlocks: false
IndentCaseLabels: false
IndentExternBlock: NoIndent
IndentGotoLabels: false
IndentPPDirectives: AfterHash
IndentWidth: 4
IndentWrappedFunctionNames: false
InsertTrailingCommas: None
KeepEmptyLinesAtTheStartOfBlocks: false
LambdaBodyIndentation: Signature
Language: Cpp
MaxEmptyLinesToKeep: 1
NamespaceIndentation: None
PPIndentWidth: 4
PointerAlignment: Right
ReferenceAlignment: Left
ReflowComments: false
SortIncludes: CaseInsensitive
SortUsingDeclarations: false
SpaceAfterCStyleCast: true
SpaceAfterLogicalNot: false
SpaceAfterTemplateKeyword: true
SpaceAroundPointerQualifiers: Both
SpaceBeforeAssignmentOperators: true
SpaceBeforeCaseColon: false
SpaceBeforeCpp11BracedList: true
SpaceBeforeCtorInitializerColon: true
SpaceBeforeInheritanceColon: true
SpaceBeforeParens: ControlStatements
SpaceBeforeRangeBasedForLoopColon: true
SpaceBeforeSquareBrackets: false
SpaceInEmptyBlock: true
SpaceInEmptyParentheses: false
SpacesBeforeTrailingComments: 1
SpacesInAngles: Never
SpacesInConditionalStatement: false
SpacesInContainerLiterals: false
SpacesInCStyleCastParentheses: false
SpacesInParentheses: false
SpacesInSquareBrackets: false
Standard: Cpp11
UseCRLF: false
UseTab: Never