forked from alibaba-damo-academy/RynnRCP
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.clang-format
More file actions
213 lines (151 loc) · 6.37 KB
/
.clang-format
File metadata and controls
213 lines (151 loc) · 6.37 KB
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
209
210
211
212
213
# Language: None, Cpp, Java, JavaScript, ObjC, Proto, TableGen, TextProto
Language: Cpp
BasedOnStyle: Google #LLVM
# Offset for access specifiers (public, private, etc.)
AccessModifierOffset: -2
# Alignment after opening brackets ((), <, [): Align, DontAlign, AlwaysBreak (always break line after opening bracket)
AlignAfterOpenBracket: Align
# Align all equal signs in consecutive assignments
AlignConsecutiveAssignments: false
# Align all variable names in consecutive declarations
AlignConsecutiveDeclarations: false
# Right-align escaped newlines (using backslash for line break)
AlignEscapedNewlines: Right
# Horizontally align operands in binary and ternary expressions
AlignOperands: true
# Align trailing comments in consecutive lines
AlignTrailingComments: true
# Do not allow all parameters of a function declaration to be on the next line
AllowAllParametersOfDeclarationOnNextLine: false
# Do not allow short blocks to be on the same line
AllowShortBlocksOnASingleLine: true
# Allow short case labels to be on the same line
AllowShortCaseLabelsOnASingleLine: true
# Allow short functions to be on the same line: None, InlineOnly (defined in class), Empty (empty function), Inline (defined in class, empty function), All
AllowShortFunctionsOnASingleLine: None
# Allow short if statements to remain on the same line
AllowShortIfStatementsOnASingleLine: true
# Allow short loops to remain on the same line
AllowShortLoopsOnASingleLine: true
# Always break the line after the return type: None, All, TopLevel (top-level functions excluding those in classes),
# AllDefinitions (all definitions, excluding declarations), TopLevelDefinitions (definitions of all top-level functions)
AlwaysBreakAfterReturnType: None
# Always break line before multiline string literals
AlwaysBreakBeforeMultilineStrings: false
# Always break line after template declarations
AlwaysBreakTemplateDeclarations: true
# false means function arguments should either all be on the same line or each on separate lines
BinPackArguments: true
# false means all parameters should either all be on the same line or each on separate lines
BinPackParameters: true
# Brace wrapping settings when BreakBeforeBraces is set to Custom
BraceWrapping:
# After class definitions
AfterClass: false
# After control statements
AfterControlStatement: false
# After enum definitions
AfterEnum: false
# After function definitions
AfterFunction: false
# After namespace definitions
AfterNamespace: false
# After struct definitions
AfterStruct: false
# After union definitions
AfterUnion: false
# After extern blocks
AfterExternBlock: false
# Before catch clauses
BeforeCatch: false
# Before else clauses
BeforeElse: false
# Indent braces
IndentBraces: false
# Separate empty functions
SplitEmptyFunction: false
# Separate empty statements
SplitEmptyRecord: false
# Separate empty namespaces
SplitEmptyNamespace: false
# Break line before binary operators: None (break after operator), NonAssignment (break before non-assignment operators), All (break before all operators)
BreakBeforeBinaryOperators: NonAssignment
# Break line before braces: Attach (always attach braces to the surrounding context), Linux (similar to Attach except for function, namespace and class definitions),
# Mozilla (similar to Attach except for enums, functions, record definitions), Stroustrup (similar to Attach except for function definitions, catch, else),
# Allman (always break before braces), GNU (always break before braces and increase indentation for control statement braces), WebKit (break before functions), Custom
# Note: here block statements are considered part of functions
BreakBeforeBraces: Custom
# Break line before ternary operators
BreakBeforeTernaryOperators: false
# Break line after colons in constructor initializer lists
BreakConstructorInitializers: AfterColon
# BreakInheritanceList: AfterColon
BreakStringLiterals: false
# Character limit per line; 0 means no limit
ColumnLimit: 80
CompactNamespaces: true
# Constructor initializer lists should either all be on the same line or each on a separate line
ConstructorInitializerAllOnOneLineOrOnePerLine: false
# Indentation width for constructor initializer lists
ConstructorInitializerIndentWidth: 4
# Continuation line indentation width
ContinuationIndentWidth: 4
# Remove spaces before and after curly braces for C++11 list initialization
Cpp11BracedListStyle: true
# Align pointers and references according to the most common usage
DerivePointerAlignment: false
# Fix comments in namespaces
FixNamespaceComments: true
# Indent case labels
IndentCaseLabels: false
IndentPPDirectives: None
# Indentation width
IndentWidth: 2
# Indent function names when the return type is on a new line
IndentWrappedFunctionNames: false
# Keep empty lines at the start of blocks
KeepEmptyLinesAtTheStartOfBlocks: false
# Maximum number of consecutive empty lines to keep
MaxEmptyLinesToKeep: 1
# Namespace indentation: None, Inner (indent contents in nested namespaces), All
NamespaceIndentation: None
# Pointer and reference alignment: Left, Right, Middle
PointerAlignment: Right
# Allow comments to be reformatted
ReflowComments: true
# Allow sorting of includes
SortIncludes: true
# Allow sorting of using declarations
SortUsingDeclarations: false
# Add space after C-style casts
SpaceAfterCStyleCast: false
# Add space after template keyword
SpaceAfterTemplateKeyword: true
# Add space before assignment operators
SpaceBeforeAssignmentOperators: true
# SpaceBeforeCpp11BracedList: true
# SpaceBeforeCtorInitializerColon: true
# SpaceBeforeInheritanceColon: true
# Add a space before opening parenthesis: Never, ControlStatements, Always
SpaceBeforeParens: ControlStatements
# SpaceBeforeRangeBasedForLoopColon: true
# Add spaces in empty parentheses
SpaceInEmptyParentheses: false
# Number of spaces before trailing comments (only applies to //)
SpacesBeforeTrailingComments: 1
# No space before < and >
SpacesInAngles: false
# No space in C-style cast parentheses
SpacesInCStyleCastParentheses: false
# Add spaces in container literals (e.g., arrays and dictionaries in ObjC and JavaScript)
SpacesInContainerLiterals: true
# No space before ( and )
SpacesInParentheses: false
# No spaces before [ and ]
SpacesInSquareBrackets: false
# Standard: Cpp03, Cpp11, Auto
Standard: Cpp11
# Tab width
TabWidth: 2
# Use tab characters: Never, ForIndentation, ForContinuationAndIndentation, Always
UseTab: Never