-
Notifications
You must be signed in to change notification settings - Fork 14
/
.clang-format
167 lines (166 loc) · 3.3 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
---
# Trinamic Software Team - C code .clang-format specification
# Version 0.1
# * This is a modified LLVM style.
# * Any setting not related to C was removed.
# * All settings are listed in alphabetic order.
AlignAfterOpenBracket: Align
#
AlignArrayOfStructures: Right
#
AlignConsecutiveAssignments: Consecutive
AlignConsecutiveBitFields: None
AlignConsecutiveDeclarations: None
AlignConsecutiveMacros: AcrossComments
#
AlignEscapedNewlines: DontAlign
#
AlignOperands: Align
#
AlignTrailingComments: true
#
AllowAllArgumentsOnNextLine: true
AllowAllParametersOfDeclarationOnNextLine: true
#
AllowShortBlocksOnASingleLine: Always
AllowShortCaseLabelsOnASingleLine: false
AllowShortEnumsOnASingleLine: true
AllowShortFunctionsOnASingleLine: false
AllowShortIfStatementsOnASingleLine: Never
AllowShortLoopsOnASingleLine: true
#
AlwaysBreakAfterReturnType: None
AlwaysBreakBeforeMultilineStrings: false
#
AttributeMacros:
- __capability
#
BinPackArguments: true
BinPackParameters: true
#
BitFieldColonSpacing: Both
#
BreakBeforeBinaryOperators: None
BreakBeforeBraces: Allman
BreakBeforeConceptDeclarations: false # will be an enum in 15.0
BreakBeforeTernaryOperators: false
#
BreakStringLiterals: true
#
ColumnLimit: 120
#
CommentPragmas: '^ IWYU pragma:'
#
ContinuationIndentWidth: 4
#
DeriveLineEnding: true
DerivePointerAlignment: false
#
DisableFormat: false
#
ExperimentalAutoDetectBinPacking: false
#
ForEachMacros:
- foreach
- Q_FOREACH
- BOOST_FOREACH
#
IfMacros:
- KJ_IF_MAYBE
#
IncludeBlocks: Preserve
IncludeIsMainRegex: '(Test)?$'
IncludeIsMainSourceRegex: ''
#
IndentCaseBlocks: false
IndentCaseLabels: false
IndentExternBlock: AfterExternBlock
IndentGotoLabels: false
IndentPPDirectives: None
IndentWidth: 4
IndentWrappedFunctionNames: false
#
InsertTrailingCommas: None
#
KeepEmptyLinesAtTheStartOfBlocks: true
#
Language: Cpp
#
MacroBlockBegin: ''
MacroBlockEnd: ''
#
MaxEmptyLinesToKeep: 1
#
PenaltyBreakAssignment: 2
PenaltyBreakBeforeFirstCallParameter: 19
PenaltyBreakComment: 300
PenaltyBreakFirstLessLess: 120
PenaltyBreakOpenParenthesis: 0
PenaltyBreakString: 1000
PenaltyBreakTemplateDeclaration: 10
PenaltyExcessCharacter: 1000000
PenaltyReturnTypeOnItsOwnLine: 60
PenaltyIndentedWhitespace: 0
#
PointerAlignment: Right
#
PPIndentWidth: -1
#
QualifierAlignment: Leave
#
ReflowComments: false
#
SeparateDefinitionBlocks: Leave
#
SortIncludes: Never
#
SpaceAfterCStyleCast: true
SpaceAfterLogicalNot: false
#
SpaceAroundPointerQualifiers: Default
#
SpaceBeforeAssignmentOperators: true
SpaceBeforeCaseColon: false
SpaceBeforeParens: Custom
SpaceBeforeParensOptions:
AfterControlStatements: true
AfterForeachMacros: true
AfterFunctionDefinitionName: false
AfterFunctionDeclarationName: false
AfterIfMacros: true
BeforeNonEmptyParentheses: false
SpaceBeforeSquareBrackets: false
#
SpaceInEmptyBlock: false
SpaceInEmptyParentheses: false
#
SpacesBeforeTrailingComments: 1
#
SpacesInConditionalStatement: false
SpacesInCStyleCastParentheses: false
SpacesInLineCommentPrefix:
Minimum: 1
Maximum: -1
SpacesInParentheses: false
SpacesInSquareBrackets: false
#
Standard: Latest
#
StatementAttributeLikeMacros:
- Q_EMIT
StatementMacros:
- Q_UNUSED
- QT_REQUIRE_VERSION
#
TabWidth: 8
#
UseCRLF: false
UseTab: Never
#
WhitespaceSensitiveMacros:
- STRINGIZE
- PP_STRINGIZE
- BOOST_PP_STRINGIZE
- NS_SWIFT_NAME
- CF_SWIFT_NAME
...