.clang-format 6.13 KB
Newer Older
1
2
3
4
5
6
---
Language:        Cpp
# BasedOnStyle:  Google
AccessModifierOffset: -1
AlignAfterOpenBracket: AlwaysBreak
AlignArrayOfStructures: None
Hongzhi (Steve), Chen's avatar
Hongzhi (Steve), Chen committed
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
AlignConsecutiveAssignments:
  Enabled:         false
  AcrossEmptyLines: false
  AcrossComments:  false
  AlignCompound:   false
  PadOperators:    true
AlignConsecutiveBitFields:
  Enabled:         false
  AcrossEmptyLines: false
  AcrossComments:  false
  AlignCompound:   false
  PadOperators:    false
AlignConsecutiveDeclarations:
  Enabled:         false
  AcrossEmptyLines: false
  AcrossComments:  false
  AlignCompound:   false
  PadOperators:    false
AlignConsecutiveMacros:
  Enabled:         false
  AcrossEmptyLines: false
  AcrossComments:  false
  AlignCompound:   false
  PadOperators:    false
31
32
33
34
35
36
AlignEscapedNewlines: Left
AlignOperands:   Align
AllowAllArgumentsOnNextLine: true
AllowAllParametersOfDeclarationOnNextLine: true
AllowShortBlocksOnASingleLine: Never
AllowShortCaseLabelsOnASingleLine: false
Hongzhi (Steve), Chen's avatar
Hongzhi (Steve), Chen committed
37
AllowShortEnumsOnASingleLine: true
38
AllowShortFunctionsOnASingleLine: All
39
AllowShortIfStatementsOnASingleLine: WithoutElse
Hongzhi (Steve), Chen's avatar
Hongzhi (Steve), Chen committed
40
AllowShortLambdasOnASingleLine: All
41
42
43
44
45
46
47
48
49
AllowShortLoopsOnASingleLine: true
AlwaysBreakAfterDefinitionReturnType: None
AlwaysBreakAfterReturnType: None
AlwaysBreakBeforeMultilineStrings: true
AlwaysBreakTemplateDeclarations: Yes
AttributeMacros:
  - __capability
BinPackArguments: true
BinPackParameters: true
Hongzhi (Steve), Chen's avatar
Hongzhi (Steve), Chen committed
50
BitFieldColonSpacing: Both
51
52
53
54
55
BraceWrapping:
  AfterCaseLabel:  false
  AfterClass:      false
  AfterControlStatement: Never
  AfterEnum:       false
Hongzhi (Steve), Chen's avatar
Hongzhi (Steve), Chen committed
56
  AfterExternBlock: false
57
58
59
60
61
62
63
64
65
66
67
68
69
  AfterFunction:   false
  AfterNamespace:  false
  AfterObjCDeclaration: false
  AfterStruct:     false
  AfterUnion:      false
  BeforeCatch:     false
  BeforeElse:      false
  BeforeLambdaBody: false
  BeforeWhile:     false
  IndentBraces:    false
  SplitEmptyFunction: true
  SplitEmptyRecord: true
  SplitEmptyNamespace: true
Hongzhi (Steve), Chen's avatar
Hongzhi (Steve), Chen committed
70
BreakAfterJavaFieldAnnotations: false
71
BreakBeforeBinaryOperators: None
Hongzhi (Steve), Chen's avatar
Hongzhi (Steve), Chen committed
72
BreakBeforeConceptDeclarations: Always
73
74
75
BreakBeforeBraces: Attach
BreakBeforeTernaryOperators: true
BreakConstructorInitializers: BeforeColon
Hongzhi (Steve), Chen's avatar
Hongzhi (Steve), Chen committed
76
BreakInheritanceList: BeforeColon
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
BreakStringLiterals: true
ColumnLimit:     80
CommentPragmas:  '^ IWYU pragma:'
CompactNamespaces: false
ConstructorInitializerIndentWidth: 4
ContinuationIndentWidth: 4
Cpp11BracedListStyle: true
DerivePointerAlignment: true
DisableFormat:   false
EmptyLineAfterAccessModifier: Never
EmptyLineBeforeAccessModifier: LogicalBlock
ExperimentalAutoDetectBinPacking: false
FixNamespaceComments: true
ForEachMacros:
  - foreach
  - Q_FOREACH
  - BOOST_FOREACH
IfMacros:
  - KJ_IF_MAYBE
IncludeBlocks:   Regroup
IncludeCategories:
  - Regex:           '^<ext/.*\.h>'
    Priority:        2
    SortPriority:    0
    CaseSensitive:   false
  - Regex:           '^<.*\.h>'
    Priority:        1
    SortPriority:    0
    CaseSensitive:   false
  - Regex:           '^<.*'
    Priority:        2
    SortPriority:    0
    CaseSensitive:   false
  - Regex:           '.*'
    Priority:        3
    SortPriority:    0
    CaseSensitive:   false
IncludeIsMainRegex: '([-_](test|unittest))?$'
IncludeIsMainSourceRegex: ''
IndentAccessModifiers: false
117
IndentCaseBlocks: false
Hongzhi (Steve), Chen's avatar
Hongzhi (Steve), Chen committed
118
119
IndentCaseLabels: true
IndentExternBlock: AfterExternBlock
120
121
IndentGotoLabels: true
IndentPPDirectives: None
Hongzhi (Steve), Chen's avatar
Hongzhi (Steve), Chen committed
122
IndentRequiresClause: true
123
124
IndentWidth:     2
IndentWrappedFunctionNames: false
Hongzhi (Steve), Chen's avatar
Hongzhi (Steve), Chen committed
125
InsertBraces:    false
126
127
128
129
130
131
132
133
134
135
136
137
138
139
InsertTrailingCommas: None
JavaScriptQuotes: Leave
JavaScriptWrapImports: true
KeepEmptyLinesAtTheStartOfBlocks: false
LambdaBodyIndentation: Signature
MacroBlockBegin: ''
MacroBlockEnd:   ''
MaxEmptyLinesToKeep: 1
NamespaceIndentation: None
ObjCBinPackProtocolList: Never
ObjCBlockIndentWidth: 2
ObjCBreakBeforeNestedBlockParam: true
ObjCSpaceAfterProperty: false
ObjCSpaceBeforeProtocolList: true
Hongzhi (Steve), Chen's avatar
Hongzhi (Steve), Chen committed
140
PackConstructorInitializers: NextLine
141
142
143
144
145
146
147
148
PenaltyBreakAssignment: 2
PenaltyBreakBeforeFirstCallParameter: 1
PenaltyBreakComment: 300
PenaltyBreakFirstLessLess: 120
PenaltyBreakOpenParenthesis: 0
PenaltyBreakString: 1000
PenaltyBreakTemplateDeclaration: 10
PenaltyExcessCharacter: 1000000
149
PenaltyIndentedWhitespace: 0
Hongzhi (Steve), Chen's avatar
Hongzhi (Steve), Chen committed
150
PenaltyReturnTypeOnItsOwnLine: 200
151
152
PointerAlignment: Left
PPIndentWidth:   -1
Hongzhi (Steve), Chen's avatar
Hongzhi (Steve), Chen committed
153
QualifierAlignment: Leave
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
RawStringFormats:
  - Language:        Cpp
    Delimiters:
      - cc
      - CC
      - cpp
      - Cpp
      - CPP
      - 'c++'
      - 'C++'
    CanonicalDelimiter: ''
    BasedOnStyle:    google
  - Language:        TextProto
    Delimiters:
      - pb
      - PB
      - proto
      - PROTO
    EnclosingFunctions:
      - EqualsProto
      - EquivToProto
      - PARSE_PARTIAL_TEXT_PROTO
      - PARSE_TEST_PROTO
      - PARSE_TEXT_PROTO
      - ParseTextOrDie
      - ParseTextProtoOrDie
      - ParseTestProto
      - ParsePartialTestProto
    CanonicalDelimiter: pb
    BasedOnStyle:    google
ReferenceAlignment: Pointer
ReflowComments:  true
RemoveBracesLLVM: false
Hongzhi (Steve), Chen's avatar
Hongzhi (Steve), Chen committed
187
RequiresClausePosition: OwnLine
188
189
190
191
192
193
194
SeparateDefinitionBlocks: Leave
ShortNamespaceLines: 1
SortIncludes:    CaseSensitive
SortJavaStaticImport: Before
SpaceAfterCStyleCast: false
SpaceAfterLogicalNot: false
SpaceAfterTemplateKeyword: true
Hongzhi (Steve), Chen's avatar
Hongzhi (Steve), Chen committed
195
SpaceAroundPointerQualifiers: Default
196
197
198
199
200
201
202
203
204
205
206
207
208
SpaceBeforeAssignmentOperators: true
SpaceBeforeCaseColon: false
SpaceBeforeCpp11BracedList: false
SpaceBeforeCtorInitializerColon: true
SpaceBeforeInheritanceColon: true
SpaceBeforeParens: ControlStatements
SpaceBeforeParensOptions:
  AfterControlStatements: true
  AfterForeachMacros: true
  AfterFunctionDefinitionName: false
  AfterFunctionDeclarationName: false
  AfterIfMacros:   true
  AfterOverloadedOperator: false
Hongzhi (Steve), Chen's avatar
Hongzhi (Steve), Chen committed
209
210
  AfterRequiresInClause: false
  AfterRequiresInExpression: false
211
212
  BeforeNonEmptyParentheses: false
SpaceBeforeRangeBasedForLoopColon: true
Hongzhi (Steve), Chen's avatar
Hongzhi (Steve), Chen committed
213
SpaceBeforeSquareBrackets: false
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
SpaceInEmptyBlock: false
SpacesBeforeTrailingComments: 2
SpacesInAngles:  Never
SpacesInContainerLiterals: true
SpacesInLineCommentPrefix:
  Minimum:         1
  Maximum:         -1
SpacesInSquareBrackets: false
Standard:        Auto
StatementAttributeLikeMacros:
  - Q_EMIT
StatementMacros:
  - Q_UNUSED
  - QT_REQUIRE_VERSION
TabWidth:        8
UseTab:          Never
WhitespaceSensitiveMacros:
  - BOOST_PP_STRINGIZE
232
  - CF_SWIFT_NAME
Hongzhi (Steve), Chen's avatar
Hongzhi (Steve), Chen committed
233
234
235
  - NS_SWIFT_NAME
  - PP_STRINGIZE
  - STRINGIZE
236
237
...