@schemastore/clang-format 0.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +12 -0
- package/index.d.ts +1116 -0
- package/package.json +14 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) Florian Imdahl. All rights reserved.
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE
|
package/README.md
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# Installation
|
|
2
|
+
> `npm install --save @schemastore/clang-format`
|
|
3
|
+
|
|
4
|
+
# Summary
|
|
5
|
+
This package contains type definitions for clang-format.
|
|
6
|
+
|
|
7
|
+
## Details
|
|
8
|
+
Files were exported from https://github.com/ffflorian/schemastore-updater/tree/main/schemas/clang-format.
|
|
9
|
+
|
|
10
|
+
## Additional Details
|
|
11
|
+
* Last updated: Tue, Jan 17, 2023, 20:16:45 GMT
|
|
12
|
+
* Dependencies: none
|
package/index.d.ts
ADDED
|
@@ -0,0 +1,1116 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/**
|
|
3
|
+
* This file was automatically generated by json-schema-to-typescript.
|
|
4
|
+
* DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,
|
|
5
|
+
* and run json-schema-to-typescript to regenerate this file.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* The .clang-format file is a YAML file defining formatting styles used by clang-format.
|
|
10
|
+
|
|
11
|
+
see https://clang.llvm.org/docs/ClangFormatStyleOptions.html
|
|
12
|
+
*/
|
|
13
|
+
export interface ClangFormatConfig {
|
|
14
|
+
/**
|
|
15
|
+
* The style used for all options not specifically set in the configuration.
|
|
16
|
+
*/
|
|
17
|
+
BasedOnStyle?:
|
|
18
|
+
| "Chromium"
|
|
19
|
+
| "Google"
|
|
20
|
+
| "LLVM"
|
|
21
|
+
| "Mozilla"
|
|
22
|
+
| "WebKit"
|
|
23
|
+
| "Microsoft"
|
|
24
|
+
| "GNU"
|
|
25
|
+
| "InheritParentConfig"
|
|
26
|
+
| "chromium"
|
|
27
|
+
| "google"
|
|
28
|
+
| "llvm"
|
|
29
|
+
| "mozilla"
|
|
30
|
+
| "webkit"
|
|
31
|
+
| "microsoft"
|
|
32
|
+
| "gnu"
|
|
33
|
+
| "inheritparentconfig";
|
|
34
|
+
/**
|
|
35
|
+
* clang-format 3.3
|
|
36
|
+
|
|
37
|
+
The extra indent or outdent of access modifiers, e.g. public:.
|
|
38
|
+
*/
|
|
39
|
+
AccessModifierOffset?: number;
|
|
40
|
+
/**
|
|
41
|
+
* clang-format 3.8
|
|
42
|
+
|
|
43
|
+
This applies to round brackets (parentheses), angle brackets and square brackets.
|
|
44
|
+
*/
|
|
45
|
+
AlignAfterOpenBracket?: "Align" | "DontAlign" | "AlwaysBreak" | "BlockIndent";
|
|
46
|
+
/**
|
|
47
|
+
* clang-format 13
|
|
48
|
+
|
|
49
|
+
if not None, when using initialization for an array of structs aligns the fields into columns.
|
|
50
|
+
*/
|
|
51
|
+
AlignArrayOfStructures?: "None" | "Left" | "Right";
|
|
52
|
+
/**
|
|
53
|
+
* clang-format 9
|
|
54
|
+
|
|
55
|
+
Style of aligning consecutive macros.
|
|
56
|
+
*/
|
|
57
|
+
AlignConsecutiveMacros?:
|
|
58
|
+
| "None"
|
|
59
|
+
| "Consecutive"
|
|
60
|
+
| "AcrossEmptyLines"
|
|
61
|
+
| "AcrossComments"
|
|
62
|
+
| "AcrossEmptyLinesAndComments";
|
|
63
|
+
/**
|
|
64
|
+
* clang-format 3.8
|
|
65
|
+
|
|
66
|
+
Style of aligning consecutive assignments.
|
|
67
|
+
*/
|
|
68
|
+
AlignConsecutiveAssignments?:
|
|
69
|
+
| "None"
|
|
70
|
+
| "Consecutive"
|
|
71
|
+
| "AcrossEmptyLines"
|
|
72
|
+
| "AcrossComments"
|
|
73
|
+
| "AcrossEmptyLinesAndComments";
|
|
74
|
+
/**
|
|
75
|
+
* clang-format 11
|
|
76
|
+
|
|
77
|
+
Style of aligning consecutive bit field.
|
|
78
|
+
*/
|
|
79
|
+
AlignConsecutiveBitFields?:
|
|
80
|
+
| "None"
|
|
81
|
+
| "Consecutive"
|
|
82
|
+
| "AcrossEmptyLines"
|
|
83
|
+
| "AcrossComments"
|
|
84
|
+
| "AcrossEmptyLinesAndComments";
|
|
85
|
+
/**
|
|
86
|
+
* clang-format 3.8
|
|
87
|
+
|
|
88
|
+
Style of aligning consecutive declarations.
|
|
89
|
+
*/
|
|
90
|
+
AlignConsecutiveDeclarations?:
|
|
91
|
+
| "None"
|
|
92
|
+
| "Consecutive"
|
|
93
|
+
| "AcrossEmptyLines"
|
|
94
|
+
| "AcrossComments"
|
|
95
|
+
| "AcrossEmptyLinesAndComments";
|
|
96
|
+
/**
|
|
97
|
+
* clang-format 5
|
|
98
|
+
|
|
99
|
+
Options for aligning backslashes in escaped newlines.
|
|
100
|
+
*/
|
|
101
|
+
AlignEscapedNewlines?: "Left" | "Right" | "DontAlign";
|
|
102
|
+
/**
|
|
103
|
+
* clang-format 3.5
|
|
104
|
+
|
|
105
|
+
If true, horizontally align operands of binary and ternary expressions.
|
|
106
|
+
*/
|
|
107
|
+
AlignOperands?: "Align" | "DontAlign" | "AlignAfterOperator";
|
|
108
|
+
/**
|
|
109
|
+
* clang-format 3.7
|
|
110
|
+
|
|
111
|
+
If true, aligns trailing comments.
|
|
112
|
+
*/
|
|
113
|
+
AlignTrailingComments?: boolean;
|
|
114
|
+
/**
|
|
115
|
+
* clang-format 9
|
|
116
|
+
|
|
117
|
+
If a function call or braced initializer list doesn’t fit on a line, allow putting all arguments onto the next line, even if BinPackArguments is false.
|
|
118
|
+
*/
|
|
119
|
+
AllowAllArgumentsOnNextLine?: boolean;
|
|
120
|
+
/**
|
|
121
|
+
* clang-format 9
|
|
122
|
+
|
|
123
|
+
This option is deprecated in clang-format 15. See NextLine of PackConstructorInitializers.
|
|
124
|
+
|
|
125
|
+
If a constructor definition with a member initializer list doesn’t fit on a single line, allow putting all member initializers onto the next line, if `ConstructorInitializerAllOnOneLineOrOnePerLine` is true. Note that this parameter has no effect if `ConstructorInitializerAllOnOneLineOrOnePerLine` is false.
|
|
126
|
+
*/
|
|
127
|
+
AllowAllConstructorInitializersOnNextLine?: boolean;
|
|
128
|
+
/**
|
|
129
|
+
* clang-format 3.3
|
|
130
|
+
|
|
131
|
+
If the function declaration doesn’t fit on a line, allow putting all parameters of a function declaration onto the next line even if BinPackParameters is false.
|
|
132
|
+
*/
|
|
133
|
+
AllowAllParametersOfDeclarationOnNextLine?: boolean;
|
|
134
|
+
/**
|
|
135
|
+
* clang-format 11
|
|
136
|
+
|
|
137
|
+
Allow short enums on a single line.
|
|
138
|
+
*/
|
|
139
|
+
AllowShortEnumsOnASingleLine?: boolean;
|
|
140
|
+
/**
|
|
141
|
+
* clang-format 3.5
|
|
142
|
+
|
|
143
|
+
Dependent on the value, while (true) { continue; } can be put on a single line.
|
|
144
|
+
*/
|
|
145
|
+
AllowShortBlocksOnASingleLine?: "Never" | "Empty" | "Always";
|
|
146
|
+
/**
|
|
147
|
+
* clang-format 3.6
|
|
148
|
+
|
|
149
|
+
If true, short case labels will be contracted to a single line.
|
|
150
|
+
*/
|
|
151
|
+
AllowShortCaseLabelsOnASingleLine?: boolean;
|
|
152
|
+
/**
|
|
153
|
+
* clang-format 3.5
|
|
154
|
+
|
|
155
|
+
Dependent on the value, int f() { return 0; } can be put on a single line.
|
|
156
|
+
*/
|
|
157
|
+
AllowShortFunctionsOnASingleLine?: "All" | "None" | "Inline" | "Empty" | "InlineOnly";
|
|
158
|
+
/**
|
|
159
|
+
* clang-format 9
|
|
160
|
+
|
|
161
|
+
Dependent on the value, auto lambda []() { return 0; } can be put on a single line.
|
|
162
|
+
*/
|
|
163
|
+
AllowShortLambdasOnASingleLine?: "None" | "Empty" | "Inline" | "All";
|
|
164
|
+
/**
|
|
165
|
+
* clang-format 9
|
|
166
|
+
|
|
167
|
+
If true, if (a) return; can be put on a single line.
|
|
168
|
+
*/
|
|
169
|
+
AllowShortIfStatementsOnASingleLine?: "AllIfsAndElse" | "Never" | "WithoutElse" | "OnlyFirstIf";
|
|
170
|
+
/**
|
|
171
|
+
* clang-format 3.7
|
|
172
|
+
|
|
173
|
+
If true, while (true) continue; can be put on a single line.
|
|
174
|
+
*/
|
|
175
|
+
AllowShortLoopsOnASingleLine?: boolean;
|
|
176
|
+
/**
|
|
177
|
+
* clang-format 3.7
|
|
178
|
+
|
|
179
|
+
This option is deprecated and is retained for backwards compatibility.
|
|
180
|
+
|
|
181
|
+
The function definition return type breaking style to use. This option is deprecated and is retained for backwards compatibility
|
|
182
|
+
*/
|
|
183
|
+
AlwaysBreakAfterDefinitionReturnType?: "None" | "All" | "TopLevel";
|
|
184
|
+
/**
|
|
185
|
+
* clang-format 3.8
|
|
186
|
+
|
|
187
|
+
The function declaration return type breaking style to use.
|
|
188
|
+
*/
|
|
189
|
+
AlwaysBreakAfterReturnType?: "None" | "All" | "TopLevel" | "AllDefinitions" | "TopLevelDefinitions";
|
|
190
|
+
/**
|
|
191
|
+
* clang-format 3.4
|
|
192
|
+
|
|
193
|
+
If true, always break before multiline string literals.
|
|
194
|
+
*/
|
|
195
|
+
AlwaysBreakBeforeMultilineStrings?: boolean;
|
|
196
|
+
/**
|
|
197
|
+
* clang-format 7
|
|
198
|
+
|
|
199
|
+
The template declaration breaking style to use.
|
|
200
|
+
*/
|
|
201
|
+
AlwaysBreakTemplateDeclarations?: "Yes" | "No" | "MultiLine";
|
|
202
|
+
/**
|
|
203
|
+
* clang-format 12
|
|
204
|
+
|
|
205
|
+
A vector of strings that should be interpreted as attributes/qualifiers instead of identifiers. This can be useful for language extensions or static analyzer annotations.
|
|
206
|
+
*/
|
|
207
|
+
AttributeMacros?: string[];
|
|
208
|
+
/**
|
|
209
|
+
* clang-format 3.7
|
|
210
|
+
|
|
211
|
+
If false, a function call’s arguments will either be all on the same line or will have one line each.
|
|
212
|
+
*/
|
|
213
|
+
BinPackArguments?: boolean;
|
|
214
|
+
/**
|
|
215
|
+
* clang-format 3.7
|
|
216
|
+
|
|
217
|
+
If false, a function declaration’s or function definition’s parameters will either all be on the same line or will have one line each.
|
|
218
|
+
*/
|
|
219
|
+
BinPackParameters?: boolean;
|
|
220
|
+
/**
|
|
221
|
+
* clang-format 12
|
|
222
|
+
|
|
223
|
+
The BitFieldColonSpacingStyle to use for bitfields.
|
|
224
|
+
*/
|
|
225
|
+
BitFieldColonSpacing?: "Both" | "None" | "Before" | "After";
|
|
226
|
+
/**
|
|
227
|
+
* clang-format 3.8
|
|
228
|
+
|
|
229
|
+
Control of individual brace wrapping cases.If BreakBeforeBraces is set to BS_Custom, use this to specify how each individual brace case should be handled. Otherwise, this is ignored.
|
|
230
|
+
*/
|
|
231
|
+
BraceWrapping?: {
|
|
232
|
+
/**
|
|
233
|
+
* bool AfterCaseLabel Wrap case labels.
|
|
234
|
+
*/
|
|
235
|
+
AfterCaseLabel?: boolean;
|
|
236
|
+
/**
|
|
237
|
+
* bool AfterClass Wrap class definitions.
|
|
238
|
+
*/
|
|
239
|
+
AfterClass?: boolean;
|
|
240
|
+
/**
|
|
241
|
+
* AfterControlStatement Wrap control statements (if/for/while/switch/..).
|
|
242
|
+
*/
|
|
243
|
+
AfterControlStatement?: "Never" | "MultiLine" | "Always";
|
|
244
|
+
/**
|
|
245
|
+
* bool AfterEnum Wrap enum definitions.
|
|
246
|
+
*/
|
|
247
|
+
AfterEnum?: boolean;
|
|
248
|
+
/**
|
|
249
|
+
* bool AfterFunction Wrap function definitions.
|
|
250
|
+
*/
|
|
251
|
+
AfterFunction?: boolean;
|
|
252
|
+
/**
|
|
253
|
+
* bool AfterNamespace Wrap namespace definitions.
|
|
254
|
+
*/
|
|
255
|
+
AfterNamespace?: boolean;
|
|
256
|
+
/**
|
|
257
|
+
* bool AfterObjCDeclaration Wrap ObjC definitions (interfaces, implementations…). @autoreleasepool and @synchronized blocks are wrapped according to AfterControlStatement flag.
|
|
258
|
+
*/
|
|
259
|
+
AfterObjCDeclaration?: boolean;
|
|
260
|
+
/**
|
|
261
|
+
* bool AfterStruct Wrap struct definitions.
|
|
262
|
+
*/
|
|
263
|
+
AfterStruct?: boolean;
|
|
264
|
+
/**
|
|
265
|
+
* bool AfterUnion Wrap union definitions.
|
|
266
|
+
*/
|
|
267
|
+
AfterUnion?: boolean;
|
|
268
|
+
/**
|
|
269
|
+
* bool AfterExternBlock Wrap extern blocks.
|
|
270
|
+
*/
|
|
271
|
+
AfterExternBlock?: boolean;
|
|
272
|
+
/**
|
|
273
|
+
* bool BeforeCatch Wrap before catch.
|
|
274
|
+
*/
|
|
275
|
+
BeforeCatch?: boolean;
|
|
276
|
+
/**
|
|
277
|
+
* bool BeforeElse Wrap before else.
|
|
278
|
+
*/
|
|
279
|
+
BeforeElse?: boolean;
|
|
280
|
+
/**
|
|
281
|
+
* bool BeforeLambdaBody Wrap lambda block.
|
|
282
|
+
*/
|
|
283
|
+
BeforeLambdaBody?: boolean;
|
|
284
|
+
/**
|
|
285
|
+
* bool BeforeWhile Wrap before while.
|
|
286
|
+
*/
|
|
287
|
+
BeforeWhile?: boolean;
|
|
288
|
+
/**
|
|
289
|
+
* bool IndentBraces Indent the wrapped braces themselves.
|
|
290
|
+
*/
|
|
291
|
+
IndentBraces?: boolean;
|
|
292
|
+
/**
|
|
293
|
+
* bool SplitEmptyFunction If false, empty function body can be put on a single line. This option is used only if the opening brace of the function has already been wrapped, i.e. the AfterFunction brace wrapping mode is set, and the function could/should not be put on a single line (as per AllowShortFunctionsOnASingleLine and constructor formatting options).
|
|
294
|
+
*/
|
|
295
|
+
SplitEmptyFunction?: boolean;
|
|
296
|
+
/**
|
|
297
|
+
* bool SplitEmptyRecord If false, empty record (e.g. class, struct or union) body can be put on a single line. This option is used only if the opening brace of the record has already been wrapped, i.e. the AfterClass (for classes) brace wrapping mode is set.
|
|
298
|
+
*/
|
|
299
|
+
SplitEmptyRecord?: boolean;
|
|
300
|
+
/**
|
|
301
|
+
* bool SplitEmptyNamespace If false, empty namespace body can be put on a single line. This option is used only if the opening brace of the namespace has already been wrapped, i.e. the AfterNamespace brace wrapping mode is set.
|
|
302
|
+
*/
|
|
303
|
+
SplitEmptyNamespace?: boolean;
|
|
304
|
+
[k: string]: unknown;
|
|
305
|
+
};
|
|
306
|
+
/**
|
|
307
|
+
* clang-format 3.8
|
|
308
|
+
|
|
309
|
+
Break after each annotation on a field in Java files.
|
|
310
|
+
*/
|
|
311
|
+
BreakAfterJavaFieldAnnotations?: boolean;
|
|
312
|
+
/**
|
|
313
|
+
* clang-format 3.6
|
|
314
|
+
|
|
315
|
+
The way to wrap binary operators.
|
|
316
|
+
*/
|
|
317
|
+
BreakBeforeBinaryOperators?: "None" | "NonAssignment" | "All";
|
|
318
|
+
/**
|
|
319
|
+
* clang-format 3.7
|
|
320
|
+
|
|
321
|
+
The brace breaking style to use.
|
|
322
|
+
*/
|
|
323
|
+
BreakBeforeBraces?:
|
|
324
|
+
| "Attach"
|
|
325
|
+
| "Linux"
|
|
326
|
+
| "Mozilla"
|
|
327
|
+
| "Stroustrup"
|
|
328
|
+
| "Allman"
|
|
329
|
+
| "Whitesmiths"
|
|
330
|
+
| "GNU"
|
|
331
|
+
| "WebKit"
|
|
332
|
+
| "Custom";
|
|
333
|
+
BreakBeforeConceptDeclarations?: boolean | ("Never" | "Allowed" | "Always");
|
|
334
|
+
/**
|
|
335
|
+
* clnag-format 5
|
|
336
|
+
|
|
337
|
+
If true, in the class inheritance expression clang-format will break before : and , if there is multiple inheritance.
|
|
338
|
+
*/
|
|
339
|
+
BreakBeforeInheritanceComma?: boolean;
|
|
340
|
+
/**
|
|
341
|
+
* clang-format 3.7
|
|
342
|
+
|
|
343
|
+
If true, ternary operators will be placed after line breaks.
|
|
344
|
+
*/
|
|
345
|
+
BreakBeforeTernaryOperators?: boolean;
|
|
346
|
+
/**
|
|
347
|
+
* clang-format 5
|
|
348
|
+
|
|
349
|
+
The constructor initializers style to use.
|
|
350
|
+
*/
|
|
351
|
+
BreakConstructorInitializers?: "BeforeColon" | "BeforeComma" | "AfterColon";
|
|
352
|
+
/**
|
|
353
|
+
* clang-format 7
|
|
354
|
+
|
|
355
|
+
The inheritance list style to use.
|
|
356
|
+
*/
|
|
357
|
+
BreakInheritanceList?: "BeforeColon" | "BeforeComma" | "AfterColon" | "AfterComma";
|
|
358
|
+
/**
|
|
359
|
+
* clang-format 3.9
|
|
360
|
+
|
|
361
|
+
Allow breaking string literals when formatting.
|
|
362
|
+
*/
|
|
363
|
+
BreakStringLiterals?: boolean;
|
|
364
|
+
/**
|
|
365
|
+
* clang-format 3.8
|
|
366
|
+
|
|
367
|
+
Always break constructor initializers before commas and align the commas with the colon.
|
|
368
|
+
*/
|
|
369
|
+
BreakConstructorInitializersBeforeComma?: boolean;
|
|
370
|
+
/**
|
|
371
|
+
* clang-format 3.7
|
|
372
|
+
|
|
373
|
+
The column limit.
|
|
374
|
+
*/
|
|
375
|
+
ColumnLimit?: number;
|
|
376
|
+
/**
|
|
377
|
+
* clang-format 3.7
|
|
378
|
+
|
|
379
|
+
A regular expression that describes comments with special meaning, which should not be split into lines or otherwise changed.
|
|
380
|
+
*/
|
|
381
|
+
CommentPragmas?: string;
|
|
382
|
+
/**
|
|
383
|
+
* clang-format 5
|
|
384
|
+
|
|
385
|
+
If true, consecutive namespace declarations will be on the same line. If false, each namespace is declared on a new line.
|
|
386
|
+
*/
|
|
387
|
+
CompactNamespaces?: boolean;
|
|
388
|
+
/**
|
|
389
|
+
* clang-format 3.7
|
|
390
|
+
|
|
391
|
+
This option is deprecated. See CurrentLine of PackConstructorInitializers.
|
|
392
|
+
*/
|
|
393
|
+
ConstructorInitializerAllOnOneLineOrOnePerLine?: boolean;
|
|
394
|
+
/**
|
|
395
|
+
* clang-format 3.7
|
|
396
|
+
|
|
397
|
+
The number of characters to use for indentation of constructor initializer lists as well as inheritance lists.
|
|
398
|
+
*/
|
|
399
|
+
ConstructorInitializerIndentWidth?: number;
|
|
400
|
+
/**
|
|
401
|
+
* clang-format 3.7
|
|
402
|
+
|
|
403
|
+
Indent width for line continuations.
|
|
404
|
+
*/
|
|
405
|
+
ContinuationIndentWidth?: number;
|
|
406
|
+
/**
|
|
407
|
+
* clang-format 3.4
|
|
408
|
+
|
|
409
|
+
If true, format braced lists as best suited for C++11 braced lists.
|
|
410
|
+
*/
|
|
411
|
+
Cpp11BracedListStyle?: boolean;
|
|
412
|
+
/**
|
|
413
|
+
* clang-format 10
|
|
414
|
+
|
|
415
|
+
Analyze the formatted file for the most used line ending (
|
|
416
|
+
* or
|
|
417
|
+
* ). UseCRLF is only used as a fallback if none can be derived.
|
|
418
|
+
*/
|
|
419
|
+
DeriveLineEnding?: boolean;
|
|
420
|
+
/**
|
|
421
|
+
* clang-format 3.7
|
|
422
|
+
|
|
423
|
+
If true, analyze the formatted file for the most common alignment of & and *. Pointer and reference alignment styles are going to be updated according to the preferences found in the file. PointerAlignment is then used only as fallback.
|
|
424
|
+
*/
|
|
425
|
+
DerivePointerAlignment?: boolean;
|
|
426
|
+
/**
|
|
427
|
+
* clang-format 3.7
|
|
428
|
+
|
|
429
|
+
Disables formatting completely.
|
|
430
|
+
*/
|
|
431
|
+
DisableFormat?: boolean;
|
|
432
|
+
/**
|
|
433
|
+
* clang-format 13
|
|
434
|
+
|
|
435
|
+
Defines when to put an empty line after access modifiers. EmptyLineBeforeAccessModifier configuration handles the number of empty lines between two access modifiers.
|
|
436
|
+
*/
|
|
437
|
+
EmptyLineAfterAccessModifier?: "Never" | "Leave" | "Always";
|
|
438
|
+
/**
|
|
439
|
+
* clang-format 12
|
|
440
|
+
|
|
441
|
+
Defines in which cases to put empty line before access modifiers.
|
|
442
|
+
*/
|
|
443
|
+
EmptyLineBeforeAccessModifier?: "LogicalBlock" | "Never" | "Leave" | "Always";
|
|
444
|
+
/**
|
|
445
|
+
* clang-format 3.7
|
|
446
|
+
|
|
447
|
+
If true, clang-format detects whether function calls and definitions are formatted with one parameter per line.
|
|
448
|
+
*/
|
|
449
|
+
ExperimentalAutoDetectBinPacking?: boolean;
|
|
450
|
+
/**
|
|
451
|
+
* clang-format 5
|
|
452
|
+
|
|
453
|
+
If true, clang-format adds missing namespace end comments for short namespaces and fixes invalid existing ones. Short ones are controlled by “ShortNamespaceLines”.
|
|
454
|
+
*/
|
|
455
|
+
FixNamespaceComments?: boolean;
|
|
456
|
+
/**
|
|
457
|
+
* clang-format 3.7
|
|
458
|
+
|
|
459
|
+
A vector of macros that should be interpreted as foreach loops instead of as function calls.
|
|
460
|
+
*/
|
|
461
|
+
ForEachMacros?: string[];
|
|
462
|
+
/**
|
|
463
|
+
* clang-format 13
|
|
464
|
+
|
|
465
|
+
A vector of macros that should be interpreted as conditionals instead of as function calls.
|
|
466
|
+
*/
|
|
467
|
+
IfMacros?: string[];
|
|
468
|
+
/**
|
|
469
|
+
* clang-format 7
|
|
470
|
+
|
|
471
|
+
Dependent on the value, multiple #include blocks can be sorted as one and divided based on category.
|
|
472
|
+
*/
|
|
473
|
+
IncludeBlocks?: "Regroup" | "Preserve" | "Merge";
|
|
474
|
+
/**
|
|
475
|
+
* clang-format 7
|
|
476
|
+
|
|
477
|
+
Regular expressions denoting the different #include categories used for ordering #includes. If none of the regular expressions match, INT_MAX is assigned as category.The main header for a source file automatically gets category 0. so that it is generally kept at the beginning of the #includes (https://llvm.org/docs/CodingStandards.html#include-style). However, you can also assign negative priorities if you have certain headers that always need to be first.
|
|
478
|
+
There is a third and optional field SortPriority which can used while IncludeBlocks = IBS_Regroup to define the priority in which #includes should be ordered. The value of Priority defines the order of #include blocks and also allows the grouping of #includes of different priority. SortPriority is set to the value of Priority as default if it is not assigned.
|
|
479
|
+
*/
|
|
480
|
+
IncludeCategories?: {
|
|
481
|
+
Regex: string;
|
|
482
|
+
Priority: number;
|
|
483
|
+
SortPriority?: number;
|
|
484
|
+
CaseSensitive?: boolean;
|
|
485
|
+
[k: string]: unknown;
|
|
486
|
+
}[];
|
|
487
|
+
/**
|
|
488
|
+
* clang-format 7
|
|
489
|
+
|
|
490
|
+
Specify a regular expression of suffixes that are allowed in the file-to-main-include mapping.
|
|
491
|
+
When guessing whether a #include is the “main” include (to assign category 0, see above), use this regex of allowed suffixes to the header stem. A partial match is done, so that: - “” means “arbitrary suffix” - “$” means “no suffix”
|
|
492
|
+
For example, if configured to “(_test)?$”, then a header a.h would be seen as the “main” include in both a.cc and a_test.cc.
|
|
493
|
+
*/
|
|
494
|
+
IncludeIsMainRegex?: string;
|
|
495
|
+
/**
|
|
496
|
+
* clang-format 7
|
|
497
|
+
|
|
498
|
+
Specify a regular expression for files being formatted that are allowed to be considered “main” in the file-to-main-include mapping.
|
|
499
|
+
By default, clang-format considers files as “main” only when they end with: .c, .cc, .cpp, .c++, .cxx, .m or .mm extensions. For these files a guessing of “main” include takes place (to assign category 0, see above). This config option allows for additional suffixes and extensions for files to be considered as “main”.
|
|
500
|
+
By default, clang-format considers files as “main” only when they end with: .c, .cc, .cpp, .c++, .cxx, .m or .mm extensions. For these files a guessing of “main” include takes place (to assign category 0, see above). This config option allows for additional suffixes and extensions for files to be considered as “main”.
|
|
501
|
+
*/
|
|
502
|
+
IncludeIsMainSourceRegex?: string;
|
|
503
|
+
/**
|
|
504
|
+
* clang-format 13
|
|
505
|
+
|
|
506
|
+
Specify whether access modifiers should have their own indentation level.
|
|
507
|
+
When false, access modifiers are indented (or outdented) relative to the record members, respecting the AccessModifierOffset. Record members are indented one level below the record. When true, access modifiers get their own indentation level. As a consequence, record members are always indented 2 levels below the record, regardless of the access modifier presence. Value of the AccessModifierOffset is ignored.
|
|
508
|
+
*/
|
|
509
|
+
IndentAccessModifiers?: boolean;
|
|
510
|
+
/**
|
|
511
|
+
* clang-format 11
|
|
512
|
+
|
|
513
|
+
Indent case label blocks one level from the case label.
|
|
514
|
+
When false, the block following the case label uses the same indentation level as for the case label, treating the case label the same as an if-statement. When true, the block gets indented as a scope block.
|
|
515
|
+
*/
|
|
516
|
+
IndentCaseBlocks?: boolean;
|
|
517
|
+
/**
|
|
518
|
+
* clang-format 3.3
|
|
519
|
+
|
|
520
|
+
Indent case labels one level from the switch statement.
|
|
521
|
+
When false, use the same indentation level as for the switch statement. Switch statement body is always indented one level more than case labels (except the first block following the case label, which itself indents the code - unless IndentCaseBlocks is enabled).
|
|
522
|
+
*/
|
|
523
|
+
IndentCaseLabels?: boolean;
|
|
524
|
+
/**
|
|
525
|
+
* clang-format 11
|
|
526
|
+
|
|
527
|
+
IndentExternBlockStyle is the type of indenting of extern blocks.
|
|
528
|
+
*/
|
|
529
|
+
IndentExternBlock?: "AfterExternBlock" | "NonIndent" | "Indent";
|
|
530
|
+
/**
|
|
531
|
+
* clang-format 10
|
|
532
|
+
|
|
533
|
+
Indent goto labels.
|
|
534
|
+
When false, goto labels are flushed left.
|
|
535
|
+
*/
|
|
536
|
+
IndentGotoLabels?: boolean;
|
|
537
|
+
/**
|
|
538
|
+
* clang-format 6
|
|
539
|
+
|
|
540
|
+
The preprocessor directive indenting style to use.
|
|
541
|
+
*/
|
|
542
|
+
IndentPPDirectives?: "None" | "AfterHash" | "BeforeHash";
|
|
543
|
+
/**
|
|
544
|
+
* clang-format 15
|
|
545
|
+
|
|
546
|
+
Indent the requires clause in a template. This only applies when RequiresClausePosition is OwnLine, or WithFollowing.
|
|
547
|
+
*/
|
|
548
|
+
IndentRequiresClause?: boolean;
|
|
549
|
+
/**
|
|
550
|
+
* clang-format 12-14
|
|
551
|
+
|
|
552
|
+
Indent the requires clause in a template. This only applies when RequiresClausePosition is OwnLine, or WithFollowing. In clang-format 12, 13 and 14 it was named IndentRequires.
|
|
553
|
+
*/
|
|
554
|
+
IndentRequires?: boolean;
|
|
555
|
+
/**
|
|
556
|
+
* clang-format 3.7
|
|
557
|
+
|
|
558
|
+
The number of columns to use for indentation.
|
|
559
|
+
*/
|
|
560
|
+
IndentWidth?: number;
|
|
561
|
+
/**
|
|
562
|
+
* clang-format 3.7
|
|
563
|
+
|
|
564
|
+
Indent if a function definition or declaration is wrapped after the type.
|
|
565
|
+
*/
|
|
566
|
+
IndentWrappedFunctionNames?: boolean;
|
|
567
|
+
/**
|
|
568
|
+
* clang-fomrat 15
|
|
569
|
+
Insert braces after control statements (if, else, for, do, and while) in C++ unless the control statements are inside macro definitions or the braces would enclose preprocessor directives.
|
|
570
|
+
|
|
571
|
+
Warning: Setting this option to true could lead to incorrect code formatting due to clang-format’s lack of complete semantic information. As such, extra care should be taken to review code changes made by this option.
|
|
572
|
+
*/
|
|
573
|
+
InsertBraces?: boolean;
|
|
574
|
+
/**
|
|
575
|
+
* clang-fromat 11
|
|
576
|
+
|
|
577
|
+
If set to TCS_Wrapped will insert trailing commas in container literals (arrays and objects) that wrap across multiple lines. It is currently only available for JavaScript and disabled by default TCS_None. InsertTrailingCommas cannot be used together with BinPackArguments as inserting the comma disables bin-packing.
|
|
578
|
+
*/
|
|
579
|
+
InsertTrailingCommas?: "None" | "Wrapped";
|
|
580
|
+
/**
|
|
581
|
+
* clang-format 8
|
|
582
|
+
|
|
583
|
+
The JavaScriptQuoteStyle to use for JavaScript strings.
|
|
584
|
+
*/
|
|
585
|
+
JavaImportGroup?: unknown[];
|
|
586
|
+
/**
|
|
587
|
+
* clang-fromat 3.9
|
|
588
|
+
|
|
589
|
+
The JavaScriptQuoteStyle to use for JavaScript strings.
|
|
590
|
+
*/
|
|
591
|
+
JavaScriptQuotes?: "Leave" | "Single" | "Double";
|
|
592
|
+
/**
|
|
593
|
+
* clang-format 3.9
|
|
594
|
+
|
|
595
|
+
Whether to wrap JavaScript import/export statements.
|
|
596
|
+
*/
|
|
597
|
+
JavaScriptWrapImports?: boolean;
|
|
598
|
+
/**
|
|
599
|
+
* clang-format 3.7
|
|
600
|
+
|
|
601
|
+
If true, the empty line at the start of blocks is kept.
|
|
602
|
+
*/
|
|
603
|
+
KeepEmptyLinesAtTheStartOfBlocks?: boolean;
|
|
604
|
+
/**
|
|
605
|
+
* clang-format 13
|
|
606
|
+
|
|
607
|
+
The indentation style of lambda bodies. Signature (the default) causes the lambda body to be indented one additional level relative to the indentation level of the signature. OuterScope forces the lambda body to be indented one additional level relative to the parent scope containing the lambda signature. For callback-heavy code, it may improve readability to have the signature indented two levels and to use OuterScope. The KJ style guide requires OuterScope. KJ style guide
|
|
608
|
+
*/
|
|
609
|
+
LambdaBodyIndentation?: "Signature" | "OuterScope";
|
|
610
|
+
/**
|
|
611
|
+
* clang-format 3.5
|
|
612
|
+
|
|
613
|
+
Language, this format style is targeted at.
|
|
614
|
+
*/
|
|
615
|
+
Language?: "None" | "Cpp" | "ObjC" | "CSharp" | "Java" | "JavaScript" | "Json" | "Proto" | "TableGen" | "TextProto";
|
|
616
|
+
/**
|
|
617
|
+
* clang-format 3.7
|
|
618
|
+
|
|
619
|
+
A regular expression matching macros that start a block.
|
|
620
|
+
*/
|
|
621
|
+
MacroBlockBegin?: string;
|
|
622
|
+
/**
|
|
623
|
+
* clang-format 3.7
|
|
624
|
+
|
|
625
|
+
A regular expression matching macros that end a block.
|
|
626
|
+
*/
|
|
627
|
+
MacroBlockEnd?: string;
|
|
628
|
+
/**
|
|
629
|
+
* clang-format 3.7
|
|
630
|
+
|
|
631
|
+
The maximum number of consecutive empty lines to keep.
|
|
632
|
+
*/
|
|
633
|
+
MaxEmptyLinesToKeep?: number;
|
|
634
|
+
/**
|
|
635
|
+
* clnag-format 3.7
|
|
636
|
+
|
|
637
|
+
The indentation used for namespaces.
|
|
638
|
+
*/
|
|
639
|
+
NamespaceIndentation?: "None" | "Inner" | "All";
|
|
640
|
+
/**
|
|
641
|
+
* clnag-format 9
|
|
642
|
+
|
|
643
|
+
A vector of macros which are used to open namespace blocks.
|
|
644
|
+
*/
|
|
645
|
+
NamespaceMacros?: string[];
|
|
646
|
+
/**
|
|
647
|
+
* clang-format 7
|
|
648
|
+
|
|
649
|
+
Controls bin-packing Objective-C protocol conformance list items into as few lines as possible when they go over ColumnLimit.If Auto (the default), delegates to the value in BinPackParameters. If that is true, bin-packs Objective-C protocol conformance list items into as few lines as possible whenever they go over ColumnLimit.
|
|
650
|
+
If Always, always bin-packs Objective-C protocol conformance list items into as few lines as possible whenever they go over ColumnLimit.
|
|
651
|
+
If Never, lays out Objective-C protocol conformance list items onto individual lines whenever they go over ColumnLimit.
|
|
652
|
+
*/
|
|
653
|
+
ObjCBinPackProtocolList?: "Never" | "Auto" | "Always";
|
|
654
|
+
/**
|
|
655
|
+
* clang-format 3.7
|
|
656
|
+
|
|
657
|
+
The number of characters to use for indentation of ObjC blocks.
|
|
658
|
+
*/
|
|
659
|
+
ObjCBlockIndentWidth?: number;
|
|
660
|
+
/**
|
|
661
|
+
* clang-format 11
|
|
662
|
+
|
|
663
|
+
Break parameters list into lines when there is nested block parameters in a function call.
|
|
664
|
+
*/
|
|
665
|
+
ObjCBreakBeforeNestedBlockParam?: boolean;
|
|
666
|
+
/**
|
|
667
|
+
* clang-format 3.7
|
|
668
|
+
|
|
669
|
+
Add a space after @property in Objective-C, i.e. use @property (readonly) instead of @property(readonly).
|
|
670
|
+
*/
|
|
671
|
+
ObjCSpaceAfterProperty?: boolean;
|
|
672
|
+
/**
|
|
673
|
+
* clang-format 3.7
|
|
674
|
+
|
|
675
|
+
Add a space in front of an Objective-C protocol list, i.e. use Foo <Protocol> instead of Foo<Protocol>.
|
|
676
|
+
*/
|
|
677
|
+
ObjCSpaceBeforeProtocolList?: boolean;
|
|
678
|
+
/**
|
|
679
|
+
* clang-format 13
|
|
680
|
+
|
|
681
|
+
The number of columns to use for indentation of preprocessor statements. When set to -1 (default) IndentWidth is used also for preprocessor statements.
|
|
682
|
+
*/
|
|
683
|
+
PPIndentWidth?: number;
|
|
684
|
+
/**
|
|
685
|
+
* clang-format 14
|
|
686
|
+
|
|
687
|
+
The pack constructor initializers style to use.
|
|
688
|
+
*/
|
|
689
|
+
PackConstructorInitializers?: "Never" | "BinPack" | "CurrentLine" | "NextLine";
|
|
690
|
+
/**
|
|
691
|
+
* clang-format 5
|
|
692
|
+
|
|
693
|
+
The penalty for breaking around an assignment operator.
|
|
694
|
+
*/
|
|
695
|
+
PenaltyBreakAssignment?: number;
|
|
696
|
+
/**
|
|
697
|
+
* clang-format 3.7
|
|
698
|
+
|
|
699
|
+
The penalty for breaking a function call after call(.
|
|
700
|
+
*/
|
|
701
|
+
PenaltyBreakBeforeFirstCallParameter?: number;
|
|
702
|
+
/**
|
|
703
|
+
* clang-format 3.7
|
|
704
|
+
|
|
705
|
+
The penalty for each line break introduced inside a comment.
|
|
706
|
+
*/
|
|
707
|
+
PenaltyBreakComment?: number;
|
|
708
|
+
/**
|
|
709
|
+
* clang-format 3.7
|
|
710
|
+
|
|
711
|
+
The penalty for breaking before the first <<.
|
|
712
|
+
*/
|
|
713
|
+
PenaltyBreakFirstLessLess?: number;
|
|
714
|
+
/**
|
|
715
|
+
* clang-format 14
|
|
716
|
+
|
|
717
|
+
The penalty for breaking after (.
|
|
718
|
+
*/
|
|
719
|
+
PenaltyBreakOpenParenthesis?: number;
|
|
720
|
+
/**
|
|
721
|
+
* clang-format 3.7
|
|
722
|
+
|
|
723
|
+
The penalty for each line break introduced inside a string literal.
|
|
724
|
+
*/
|
|
725
|
+
PenaltyBreakString?: number;
|
|
726
|
+
/**
|
|
727
|
+
* clang-format 7
|
|
728
|
+
|
|
729
|
+
The penalty for breaking after template declaration.
|
|
730
|
+
*/
|
|
731
|
+
PenaltyBreakTemplateDeclaration?: number;
|
|
732
|
+
/**
|
|
733
|
+
* clang-format 3.7
|
|
734
|
+
|
|
735
|
+
The penalty for each character outside of the column limit.
|
|
736
|
+
*/
|
|
737
|
+
PenaltyExcessCharacter?: number;
|
|
738
|
+
/**
|
|
739
|
+
* clang-format 12
|
|
740
|
+
|
|
741
|
+
Penalty for each character of whitespace indentation (counted relative to leading non-whitespace column).
|
|
742
|
+
*/
|
|
743
|
+
PenaltyIndentedWhitespace?: number;
|
|
744
|
+
/**
|
|
745
|
+
* clang-format 3.7
|
|
746
|
+
|
|
747
|
+
Penalty for putting the return type of a function onto its own line.
|
|
748
|
+
*/
|
|
749
|
+
PenaltyReturnTypeOnItsOwnLine?: number;
|
|
750
|
+
/**
|
|
751
|
+
* clang-format 3.7
|
|
752
|
+
|
|
753
|
+
Pointer and reference alignment style.
|
|
754
|
+
*/
|
|
755
|
+
PointerAlignment?: "Left" | "Right" | "Middle";
|
|
756
|
+
/**
|
|
757
|
+
* clang-format 14
|
|
758
|
+
|
|
759
|
+
Different ways to arrange specifiers and qualifiers (e.g. const/volatile).
|
|
760
|
+
|
|
761
|
+
Warning:Setting QualifierAlignment to something other than Leave, COULD lead to incorrect code formatting due to incorrect decisions made due to clang-formats lack of complete semantic information.
|
|
762
|
+
|
|
763
|
+
As such extra care should be taken to review code changes made by the use of this option.
|
|
764
|
+
*/
|
|
765
|
+
QualifierAlignment?: "Leave" | "Left" | "Right" | "Custom";
|
|
766
|
+
/**
|
|
767
|
+
* clang-format 14
|
|
768
|
+
|
|
769
|
+
The order in which the qualifiers appear. Order is an array that can contain any of the following.
|
|
770
|
+
|
|
771
|
+
Note: it MUST contain ‘type’. Items to the left of ‘type’ will be placed to the left of the type and aligned in the order supplied. Items to the right of ‘type’ will be placed to the right of the type and aligned in the order supplied.
|
|
772
|
+
*/
|
|
773
|
+
QualifierOrder?: ("const" | "inline" | "static" | "constexpr" | "volatile" | "restrict" | "type")[];
|
|
774
|
+
/**
|
|
775
|
+
* clang-format 6
|
|
776
|
+
|
|
777
|
+
Defines hints for detecting supported languages code blocks in raw strings.
|
|
778
|
+
*/
|
|
779
|
+
RawStringFormats?: {
|
|
780
|
+
/**
|
|
781
|
+
* clang-format 3.5
|
|
782
|
+
|
|
783
|
+
Language, this format style is targeted at.
|
|
784
|
+
*/
|
|
785
|
+
Language?: "None" | "Cpp" | "ObjC" | "CSharp" | "Java" | "JavaScript" | "Json" | "Proto" | "TableGen" | "TextProto";
|
|
786
|
+
Delimiters?: string[];
|
|
787
|
+
CanonicalDelimiter?: string;
|
|
788
|
+
/**
|
|
789
|
+
* The style used for all options not specifically set in the configuration.
|
|
790
|
+
*/
|
|
791
|
+
BasedOnStyle?:
|
|
792
|
+
| "Chromium"
|
|
793
|
+
| "Google"
|
|
794
|
+
| "LLVM"
|
|
795
|
+
| "Mozilla"
|
|
796
|
+
| "WebKit"
|
|
797
|
+
| "Microsoft"
|
|
798
|
+
| "GNU"
|
|
799
|
+
| "InheritParentConfig"
|
|
800
|
+
| "chromium"
|
|
801
|
+
| "google"
|
|
802
|
+
| "llvm"
|
|
803
|
+
| "mozilla"
|
|
804
|
+
| "webkit"
|
|
805
|
+
| "microsoft"
|
|
806
|
+
| "gnu"
|
|
807
|
+
| "inheritparentconfig";
|
|
808
|
+
EnclosingFunctions?: string[];
|
|
809
|
+
[k: string]: unknown;
|
|
810
|
+
}[];
|
|
811
|
+
/**
|
|
812
|
+
* clang-format 13
|
|
813
|
+
|
|
814
|
+
Reference alignment style (overrides PointerAlignment for references).
|
|
815
|
+
*/
|
|
816
|
+
ReferenceAlignment?: "Pointer" | "Left" | "Right" | "Middle";
|
|
817
|
+
/**
|
|
818
|
+
* clang-format 4
|
|
819
|
+
|
|
820
|
+
If true, clang-format will attempt to re-flow comments.
|
|
821
|
+
*/
|
|
822
|
+
ReflowComments?: boolean;
|
|
823
|
+
/**
|
|
824
|
+
* clang-format 14
|
|
825
|
+
|
|
826
|
+
Remove optional braces of control statements (if, else, for, and while) in C++ according to the LLVM coding style.
|
|
827
|
+
|
|
828
|
+
WarningThis option will be renamed and expanded to support other styles.
|
|
829
|
+
|
|
830
|
+
Setting this option to true could lead to incorrect code formatting due to clang-format’s lack of complete semantic information. As such, extra care should be taken to review code changes made by this option.
|
|
831
|
+
*/
|
|
832
|
+
RemoveBracesLLVM?: boolean;
|
|
833
|
+
/**
|
|
834
|
+
* clang-format 15
|
|
835
|
+
|
|
836
|
+
The position of the requires clause.
|
|
837
|
+
*/
|
|
838
|
+
RequiresClausePosition?: "OwnLine" | "WithPreceding" | "WithFollowing" | "SingleLine";
|
|
839
|
+
/**
|
|
840
|
+
* clang-format 14
|
|
841
|
+
|
|
842
|
+
Specifies the use of empty lines to separate definition blocks, including classes, structs, enums, and functions.
|
|
843
|
+
*/
|
|
844
|
+
SeparateDefinitionBlocks?: "Leave" | "Always" | "Never";
|
|
845
|
+
/**
|
|
846
|
+
* clang-format 13
|
|
847
|
+
|
|
848
|
+
The maximal number of unwrapped lines that a short namespace spans. Defaults to 1.
|
|
849
|
+
*/
|
|
850
|
+
ShortNamespaceLines?: number;
|
|
851
|
+
/**
|
|
852
|
+
* clang-format 4
|
|
853
|
+
|
|
854
|
+
Controls if and how clang-format will sort #includes. If Never, includes are never sorted. If CaseInsensitive, includes are sorted in an ASCIIbetical or case insensitive fashion. If CaseSensitive, includes are sorted in an alphabetical or case sensitive fashion.
|
|
855
|
+
*/
|
|
856
|
+
SortIncludes?: "CaseSensitive" | "CaseInsensitive" | "Never";
|
|
857
|
+
/**
|
|
858
|
+
* clang-format 12
|
|
859
|
+
|
|
860
|
+
When sorting Java imports, by default static imports are placed before non-static imports. If JavaStaticImportAfterImport is After, static imports are placed after non-static imports.
|
|
861
|
+
*/
|
|
862
|
+
SortJavaStaticImport?: "Before" | "After";
|
|
863
|
+
/**
|
|
864
|
+
* clang-format 5
|
|
865
|
+
|
|
866
|
+
If true, clang-format will sort using declarations.
|
|
867
|
+
*/
|
|
868
|
+
SortUsingDeclarations?: boolean;
|
|
869
|
+
/**
|
|
870
|
+
* clang-format 3.5
|
|
871
|
+
|
|
872
|
+
If true, a space is inserted after C style casts.
|
|
873
|
+
*/
|
|
874
|
+
SpaceAfterCStyleCast?: boolean;
|
|
875
|
+
/**
|
|
876
|
+
* clang-format 9
|
|
877
|
+
|
|
878
|
+
If true, a space is inserted after the logical not operator (!).
|
|
879
|
+
*/
|
|
880
|
+
SpaceAfterLogicalNot?: boolean;
|
|
881
|
+
/**
|
|
882
|
+
* clang-format 4
|
|
883
|
+
|
|
884
|
+
If true, a space will be inserted after the ‘template’ keyword.
|
|
885
|
+
*/
|
|
886
|
+
SpaceAfterTemplateKeyword?: boolean;
|
|
887
|
+
/**
|
|
888
|
+
* clang-format 12
|
|
889
|
+
|
|
890
|
+
Defines in which cases to put a space before or after pointer qualifiers
|
|
891
|
+
*/
|
|
892
|
+
SpaceAroundPointerQualifiers?: "Default" | "Before" | "After" | "Both";
|
|
893
|
+
/**
|
|
894
|
+
* clang-format 3.7
|
|
895
|
+
|
|
896
|
+
If false, spaces will be removed before assignment operators.
|
|
897
|
+
*/
|
|
898
|
+
SpaceBeforeAssignmentOperators?: boolean;
|
|
899
|
+
/**
|
|
900
|
+
* clang-format 12
|
|
901
|
+
|
|
902
|
+
If false, spaces will be removed before case colon.
|
|
903
|
+
*/
|
|
904
|
+
SpaceBeforeCaseColon?: boolean;
|
|
905
|
+
/**
|
|
906
|
+
* clang-format 7
|
|
907
|
+
|
|
908
|
+
If true, a space will be inserted before a C++11 braced list used to initialize an object (after the preceding identifier or type).
|
|
909
|
+
*/
|
|
910
|
+
SpaceBeforeCpp11BracedList?: boolean;
|
|
911
|
+
/**
|
|
912
|
+
* clang-format 7
|
|
913
|
+
|
|
914
|
+
If false, spaces will be removed before constructor initializer colon.
|
|
915
|
+
*/
|
|
916
|
+
SpaceBeforeCtorInitializerColon?: boolean;
|
|
917
|
+
/**
|
|
918
|
+
* clang-format 7
|
|
919
|
+
|
|
920
|
+
If false, spaces will be removed before inheritance colon.
|
|
921
|
+
*/
|
|
922
|
+
SpaceBeforeInheritanceColon?: boolean;
|
|
923
|
+
/**
|
|
924
|
+
* clang-format 3.5
|
|
925
|
+
|
|
926
|
+
Defines in which cases to put a space before opening parentheses.
|
|
927
|
+
*/
|
|
928
|
+
SpaceBeforeParens?:
|
|
929
|
+
| "ControlStatements"
|
|
930
|
+
| "Never"
|
|
931
|
+
| "ControlStatementsExceptControlMacros"
|
|
932
|
+
| "NonEmptyParentheses"
|
|
933
|
+
| "Always"
|
|
934
|
+
| "Custom";
|
|
935
|
+
/**
|
|
936
|
+
* clang-format 14
|
|
937
|
+
|
|
938
|
+
Control of individual space before parentheses.
|
|
939
|
+
|
|
940
|
+
If SpaceBeforeParens is set to Custom, use this to specify how each individual space before parentheses case should be handled. Otherwise, this is ignored.
|
|
941
|
+
*/
|
|
942
|
+
SpaceBeforeParensOptions?: {
|
|
943
|
+
/**
|
|
944
|
+
* bool AfterControlStatements If true, put space betwee control statement keywords (for/if/while…) and opening parentheses.
|
|
945
|
+
*/
|
|
946
|
+
AfterControlStatements?: boolean;
|
|
947
|
+
/**
|
|
948
|
+
* bool AfterForeachMacros If true, put space between foreach macros and opening parentheses.
|
|
949
|
+
*/
|
|
950
|
+
AfterForeachMacros?: boolean;
|
|
951
|
+
/**
|
|
952
|
+
* bool AfterFunctionDeclarationName If true, put a space between function declaration name and opening parentheses.
|
|
953
|
+
*/
|
|
954
|
+
AfterFunctionDeclarationName?: boolean;
|
|
955
|
+
/**
|
|
956
|
+
* bool AfterFunctionDefinitionName If true, put a space between function definition name and opening parentheses.
|
|
957
|
+
*/
|
|
958
|
+
AfterFunctionDefinitionName?: boolean;
|
|
959
|
+
/**
|
|
960
|
+
* bool AfterIfMacros If true, put space between if macros and opening parentheses.
|
|
961
|
+
*/
|
|
962
|
+
AfterIfMacros?: boolean;
|
|
963
|
+
/**
|
|
964
|
+
* bool AfterOverloadedOperator If true, put a space between operator overloading and opening parentheses.
|
|
965
|
+
*/
|
|
966
|
+
AfterOverloadedOperator?: boolean;
|
|
967
|
+
/**
|
|
968
|
+
* bool AfterRequiresInClause If true, put space between requires keyword in a requires clause and opening parentheses, if there is one.
|
|
969
|
+
*/
|
|
970
|
+
AfterRequiresInClause?: boolean;
|
|
971
|
+
/**
|
|
972
|
+
* bool AfterRequiresInExpression If true, put space between requires keyword in a requires expression and opening parentheses.
|
|
973
|
+
*/
|
|
974
|
+
AfterRequiresInExpression?: boolean;
|
|
975
|
+
/**
|
|
976
|
+
* bool BeforeNonEmptyParentheses If true, put a space before opening parentheses only if the parentheses are not empty.
|
|
977
|
+
*/
|
|
978
|
+
BeforeNonEmptyParentheses?: boolean;
|
|
979
|
+
[k: string]: unknown;
|
|
980
|
+
};
|
|
981
|
+
/**
|
|
982
|
+
* clang-format 7
|
|
983
|
+
|
|
984
|
+
If false, spaces will be removed before range-based for loop colon.
|
|
985
|
+
*/
|
|
986
|
+
SpaceBeforeRangeBasedForLoopColon?: boolean;
|
|
987
|
+
/**
|
|
988
|
+
* clang-format 10
|
|
989
|
+
|
|
990
|
+
If true, spaces will be before [. Lambdas will not be affected. Only the first [ will get a space added.
|
|
991
|
+
*/
|
|
992
|
+
SpaceBeforeSquareBrackets?: boolean;
|
|
993
|
+
/**
|
|
994
|
+
* clang-format 10
|
|
995
|
+
|
|
996
|
+
If true, spaces will be inserted into {}.
|
|
997
|
+
*/
|
|
998
|
+
SpaceInEmptyBlock?: boolean;
|
|
999
|
+
/**
|
|
1000
|
+
* clang-format 3.7
|
|
1001
|
+
|
|
1002
|
+
If true, spaces may be inserted into ().
|
|
1003
|
+
*/
|
|
1004
|
+
SpaceInEmptyParentheses?: boolean;
|
|
1005
|
+
/**
|
|
1006
|
+
* clang-format 3.7
|
|
1007
|
+
|
|
1008
|
+
The number of spaces before trailing line comments (// - comments).
|
|
1009
|
+
|
|
1010
|
+
This does not affect trailing block comments (/* - comments) as those commonly have different usage patterns and a number of special cases.
|
|
1011
|
+
*/
|
|
1012
|
+
SpacesBeforeTrailingComments?: number;
|
|
1013
|
+
/**
|
|
1014
|
+
* clang-format 3.4
|
|
1015
|
+
|
|
1016
|
+
The SpacesInAnglesStyle to use for template argument lists.
|
|
1017
|
+
*/
|
|
1018
|
+
SpacesInAngles?: "Never" | "Always" | "Leave";
|
|
1019
|
+
/**
|
|
1020
|
+
* clang-format 3.7
|
|
1021
|
+
|
|
1022
|
+
If true, spaces may be inserted into C style casts.
|
|
1023
|
+
*/
|
|
1024
|
+
SpacesInCStyleCastParentheses?: boolean;
|
|
1025
|
+
/**
|
|
1026
|
+
* clang-format 10
|
|
1027
|
+
|
|
1028
|
+
If true, spaces will be inserted around if/for/switch/while conditions.
|
|
1029
|
+
*/
|
|
1030
|
+
SpacesInConditionalStatement?: boolean;
|
|
1031
|
+
/**
|
|
1032
|
+
* clang-format 3.7
|
|
1033
|
+
|
|
1034
|
+
If true, spaces are inserted inside container literals (e.g. ObjC and Javascript array and dict literals).
|
|
1035
|
+
*/
|
|
1036
|
+
SpacesInContainerLiterals?: boolean;
|
|
1037
|
+
/**
|
|
1038
|
+
* clang-format 13
|
|
1039
|
+
|
|
1040
|
+
How many spaces are allowed at the start of a line comment. To disable the maximum set it to -1, apart from that the maximum takes precedence over the minimum.
|
|
1041
|
+
*/
|
|
1042
|
+
SpacesInLineCommentPrefix?: {
|
|
1043
|
+
Minimum?: number;
|
|
1044
|
+
Maximum?: number;
|
|
1045
|
+
[k: string]: unknown;
|
|
1046
|
+
};
|
|
1047
|
+
/**
|
|
1048
|
+
* clang-format 3.7
|
|
1049
|
+
|
|
1050
|
+
If true, spaces will be inserted after ( and before ).
|
|
1051
|
+
*/
|
|
1052
|
+
SpacesInParentheses?: boolean;
|
|
1053
|
+
/**
|
|
1054
|
+
* clang-format 3.7
|
|
1055
|
+
|
|
1056
|
+
If true, spaces will be inserted after [ and before ]. Lambdas without arguments or unspecified size array declarations will not be affected.
|
|
1057
|
+
*/
|
|
1058
|
+
SpacesInSquareBrackets?: boolean;
|
|
1059
|
+
/**
|
|
1060
|
+
* clang-format 3.7
|
|
1061
|
+
|
|
1062
|
+
Parse and format C++ constructs compatible with this standard.
|
|
1063
|
+
*/
|
|
1064
|
+
Standard?: "Auto" | "Latest" | "c++03" | "c++11" | "c++14" | "c++17" | "c++20";
|
|
1065
|
+
/**
|
|
1066
|
+
* clang-format 12
|
|
1067
|
+
|
|
1068
|
+
Macros which are ignored in front of a statement, as if they were an attribute. So that they are not parsed as identifier, for example for Qts emit.
|
|
1069
|
+
*/
|
|
1070
|
+
StatementAttributeLikeMacros?: string[];
|
|
1071
|
+
/**
|
|
1072
|
+
* clnag-format 8
|
|
1073
|
+
|
|
1074
|
+
A vector of macros that should be interpreted as complete statements.
|
|
1075
|
+
|
|
1076
|
+
Typical macros are expressions, and require a semi-colon to be added; sometimes this is not the case, and this allows to make clang-format aware of such cases.
|
|
1077
|
+
*/
|
|
1078
|
+
StatementMacros?: string[];
|
|
1079
|
+
/**
|
|
1080
|
+
* clang-format 3.7
|
|
1081
|
+
|
|
1082
|
+
The number of columns used for tab stops.
|
|
1083
|
+
*/
|
|
1084
|
+
TabWidth?: number;
|
|
1085
|
+
/**
|
|
1086
|
+
* clang-format 9
|
|
1087
|
+
|
|
1088
|
+
A vector of macros that should be interpreted as type declarations instead of as function calls.
|
|
1089
|
+
|
|
1090
|
+
For example: OpenSSL STACK_OF, BSD LIST_ENTRY.
|
|
1091
|
+
*/
|
|
1092
|
+
TypenameMacros?: string[];
|
|
1093
|
+
/**
|
|
1094
|
+
* clang-format 10
|
|
1095
|
+
|
|
1096
|
+
Use
|
|
1097
|
+
* instead of
|
|
1098
|
+
* for line breaks. Also used as fallback if DeriveLineEnding is true.
|
|
1099
|
+
*/
|
|
1100
|
+
UseCRLF?: boolean;
|
|
1101
|
+
/**
|
|
1102
|
+
* clang-format 3.7
|
|
1103
|
+
|
|
1104
|
+
The way to use tab characters in the resulting file.
|
|
1105
|
+
*/
|
|
1106
|
+
UseTab?: "Never" | "ForIndentation" | "ForContinuationAndIndentation" | "AlignWithSpaces" | "Always";
|
|
1107
|
+
/**
|
|
1108
|
+
* clang-format 11
|
|
1109
|
+
|
|
1110
|
+
A vector of macros which are whitespace-sensitive and should not be touched.
|
|
1111
|
+
|
|
1112
|
+
For example: BOOST_PP_STRINGIZE
|
|
1113
|
+
*/
|
|
1114
|
+
WhitespaceSensitiveMacros?: string[];
|
|
1115
|
+
[k: string]: unknown;
|
|
1116
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
{
|
|
2
|
+
"author": "Florian Imdahl <git@ffflorian.de>",
|
|
3
|
+
"dependencies": {},
|
|
4
|
+
"description": "TypeScript definitions for clang-format.",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"main": "index.d.ts",
|
|
7
|
+
"name": "@schemastore/clang-format",
|
|
8
|
+
"repository": "https://github.com/ffflorian/schemastore-updater/tree/main/schemas/clang-format",
|
|
9
|
+
"scripts": {},
|
|
10
|
+
"typesPublisherContentHash": "7059cb1a5236593057c1d15912ae187e8030f5d9ffe137282bbd5ae7f2327ee4",
|
|
11
|
+
"types": "index.d.ts",
|
|
12
|
+
"version": "0.0.4",
|
|
13
|
+
"typeScriptVersion": "2.2"
|
|
14
|
+
}
|