forked from ogdf/ogdf
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.clang-format
208 lines (193 loc) · 5.48 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
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
# Based on clang-format version 15.0.7
---
Language: Cpp
DisableFormat: false
BasedOnStyle: WebKit # for all options not explicitly set
## comments
CommentPragmas: '' # comments with special meaning that should not be changed
ReflowComments: false # do not touch comments due to commented out code
FixNamespaceComments: false
## macros that receive special treatment
AttributeMacros: []
ForEachMacros:
- foreach
- forall_cluster_adj
- forall_cluster_rev_adj
- forall_cluster_adj_edges
- forall_clusters
- forall_postOrderClusters
- forall_adj_elements
- forall_hypernodes
- forall_rev_hypernodes
- forall_hyperedges
- forall_rev_hyperedges
IfMacros: []
MacroBlockBegin: ''
MacroBlockEnd: ''
NamespaceMacros: []
StatementMacros: # macros that do not need an additional ";"
- OGDF_MM
- OGDF_NEW_DELETE
- OGDF_MALLOC_NEW_DELETE
- OGDF_STD_COMPARER
- OGDF_AUGMENT_COMPARER
- OGDF_AUGMENT_STATICCOMPARER
- OGDF_DECLARE_COMPARER
- READ_FILENAME
- WRITE_FILENAME
- READ_STREAM
StatementAttributeLikeMacros: []
TypenameMacros: []
WhitespaceSensitiveMacros: []
## single line statements
AllowShortBlocksOnASingleLine: Never
AllowShortCaseLabelsOnASingleLine: false
AllowShortEnumsOnASingleLine: true
AllowShortFunctionsOnASingleLine: All
AllowShortIfStatementsOnASingleLine: Never
AllowShortLambdasOnASingleLine: All
AllowShortLoopsOnASingleLine: false
## breaking lines
AllowAllArgumentsOnNextLine: true
AllowAllParametersOfDeclarationOnNextLine: true
AlwaysBreakAfterReturnType: None
AlwaysBreakBeforeMultilineStrings: false
AlwaysBreakTemplateDeclarations: Yes
BinPackArguments: true
BinPackParameters: true
BreakBeforeBinaryOperators: NonAssignment
BreakBeforeBraces: Attach
BreakBeforeConceptDeclarations: Always
BreakBeforeTernaryOperators: true
BreakConstructorInitializers: BeforeComma
BreakInheritanceList: BeforeColon
BreakStringLiterals: false
CompactNamespaces: false
PackConstructorInitializers: NextLine
RequiresClausePosition: OwnLine
## penalties: when to break line if it becomes too long
ColumnLimit: 100
PenaltyBreakFirstLessLess: 0
PenaltyBreakTemplateDeclaration: 0
PenaltyIndentedWhitespace: 0
PenaltyBreakAssignment: 1
PenaltyBreakOpenParenthesis: 1
PenaltyExcessCharacter: 10
PenaltyBreakBeforeFirstCallParameter: 50
PenaltyReturnTypeOnItsOwnLine: 100
PenaltyBreakString: 200
PenaltyBreakComment: 500 # avoid line breaks in commented out code
## sorting includes and "using"s
# note: <testing.h> must come after other <...>-includes!
SortIncludes: true
SortUsingDeclarations: true
IncludeBlocks: Regroup
IncludeCategories:
- Regex: '^<ogdf/lib/.*\.h>'
Priority: 2
SortPriority: 0
- Regex: '^<ogdf/basic/.*\.h>'
Priority: 1
SortPriority: 0
- Regex: '^<ogdf/.*\.h>'
Priority: 1
SortPriority: 1
- Regex: '^<coin/.*\.hpp>'
Priority: 2
SortPriority: 1
- Regex: '^<.*\.h>'
Priority: 4
SortPriority: 0
- Regex: '^<.*>'
Priority: 3
SortPriority: 0
- Regex: '.*'
Priority: 5
SortPriority: 0
IncludeIsMainRegex: '$'
IncludeIsMainSourceRegex: ''
## line endings
DeriveLineEnding: false
UseCRLF: false
## empty lines
EmptyLineAfterAccessModifier: Never
EmptyLineBeforeAccessModifier: LogicalBlock
KeepEmptyLinesAtTheStartOfBlocks: false
MaxEmptyLinesToKeep: 2
SeparateDefinitionBlocks: Always
## (tab) indentation
UseTab: ForContinuationAndIndentation
TabWidth: 4
AccessModifierOffset: -4 # in/outdent public private etc.
NamespaceIndentation: None
ConstructorInitializerIndentWidth: 4
ContinuationIndentWidth: 8 # to separate function content from params
IndentAccessModifiers: false
IndentCaseBlocks: false
IndentCaseLabels: false
IndentExternBlock: AfterExternBlock
IndentRequiresClause: true
IndentGotoLabels: false
IndentPPDirectives: AfterHash
IndentWidth: 4
IndentWrappedFunctionNames: false
LambdaBodyIndentation: Signature
PPIndentWidth: -1 # use IndentWidth
## (no) alignment
AlignAfterOpenBracket: false
AlignArrayOfStructures: None
AlignConsecutiveAssignments: false
AlignConsecutiveBitFields: false
AlignConsecutiveDeclarations: false
AlignConsecutiveMacros: false
AlignEscapedNewlines: Left
AlignOperands: false
AlignTrailingComments: false
## spaces
BitFieldColonSpacing: Both
SpacesBeforeTrailingComments: 1
SpaceAfterCStyleCast: false
SpaceAfterLogicalNot: false
SpaceAfterTemplateKeyword: false
SpaceAroundPointerQualifiers: Default
SpaceBeforeAssignmentOperators: true
SpaceBeforeCaseColon: false
SpaceBeforeCpp11BracedList: true
SpaceBeforeCtorInitializerColon: true
SpaceBeforeInheritanceColon: true
SpaceBeforeParens: ControlStatementsExceptControlMacros
SpaceBeforeRangeBasedForLoopColon: true
SpaceBeforeSquareBrackets: false
SpaceInEmptyBlock: true
SpaceInEmptyParentheses: false
SpacesInAngles: false
SpacesInConditionalStatement: false
SpacesInContainerLiterals: true
SpacesInCStyleCastParentheses: false
SpacesInLineCommentPrefix:
Minimum: 1
Maximum: -1
SpacesInParentheses: false
SpacesInSquareBrackets: false
Cpp11BracedListStyle: true
## pointer/qualifier/reference alignment
DerivePointerAlignment: false
PointerAlignment: Left
QualifierAlignment: Left
ReferenceAlignment: Pointer
## inserting braces for single-line control statements
InsertBraces: true
# for strings containing code
# RawStringFormats:
# - Language: Cpp
# Delimiters:
# - cc
# - CC
# - cpp
# - Cpp
# - CPP
# - 'c++'
# - 'C++'
# CanonicalDelimiter: ''
# BasedOnStyle: WebKit
...