@schemastore/clang-format 0.0.6 → 1.0.0

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.
Files changed (4) hide show
  1. package/LICENSE +674 -21
  2. package/README.md +6 -20
  3. package/index.d.ts +1295 -748
  4. package/package.json +4 -9
package/index.d.ts CHANGED
@@ -1,481 +1,604 @@
1
1
  /* eslint-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
2
 
8
3
  /**
9
4
  * 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
5
+ *
6
+ * see https://clang.llvm.org/docs/ClangFormatStyleOptions.html
12
7
  */
13
8
  export interface ClangFormatConfig {
14
9
  /**
15
10
  * The style used for all options not specifically set in the configuration.
16
11
  */
17
12
  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
- */
13
+ | 'Chromium'
14
+ | 'Google'
15
+ | 'LLVM'
16
+ | 'Mozilla'
17
+ | 'WebKit'
18
+ | 'Microsoft'
19
+ | 'GNU'
20
+ | 'InheritParentConfig'
21
+ | 'chromium'
22
+ | 'google'
23
+ | 'llvm'
24
+ | 'mozilla'
25
+ | 'webkit'
26
+ | 'microsoft'
27
+ | 'gnu'
28
+ | 'inheritparentconfig';
29
+ /**
30
+ * clang-format 3.3
31
+ *
32
+ * The extra indent or outdent of access modifiers, e.g. public:.
33
+ */
39
34
  AccessModifierOffset?: number;
40
35
  /**
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";
36
+ * clang-format 3.8
37
+ *
38
+ * This applies to round brackets (parentheses), angle brackets and square brackets.
39
+ */
40
+ AlignAfterOpenBracket?: 'Align' | 'DontAlign' | 'AlwaysBreak' | 'BlockIndent';
52
41
  /**
53
- * clang-format 9
54
-
55
- Style of aligning consecutive macros.
56
- */
42
+ * clang-format 13
43
+ *
44
+ * If not None, when using initialization for an array of structs aligns the fields into columns.
45
+ *
46
+ * NOTE: As of clang-format 15 this option only applied to arrays with equal number of columns per row.
47
+ */
48
+ AlignArrayOfStructures?: 'None' | 'Left' | 'Right';
57
49
  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
- */
50
+ | ('None' | 'Consecutive' | 'AcrossEmptyLines' | 'AcrossComments' | 'AcrossEmptyLinesAndComments')
51
+ | {
52
+ /**
53
+ * Whether aligning is enabled.
54
+ */
55
+ Enabled?: boolean;
56
+ /**
57
+ * Whether to align across empty lines.
58
+ */
59
+ AcrossEmptyLines?: boolean;
60
+ /**
61
+ * Whether to align across comments.
62
+ */
63
+ AcrossComments?: boolean;
64
+ [k: string]: unknown | undefined;
65
+ };
68
66
  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
- */
67
+ | ('None' | 'Consecutive' | 'AcrossEmptyLines' | 'AcrossComments' | 'AcrossEmptyLinesAndComments')
68
+ | {
69
+ /**
70
+ * Whether aligning is enabled.
71
+ */
72
+ Enabled?: boolean;
73
+ /**
74
+ * Whether to align across empty lines.
75
+ */
76
+ AcrossEmptyLines?: boolean;
77
+ /**
78
+ * Whether to align across comments.
79
+ */
80
+ AcrossComments?: boolean;
81
+ /**
82
+ * Whether compound assignments like += are aligned along with =.
83
+ */
84
+ AlignCompound?: boolean;
85
+ /**
86
+ * Whether short assignment operators are left-padded to the same length as long ones in order to put all assignment operators to the right of the left hand side.
87
+ */
88
+ PadOperators?: boolean;
89
+ [k: string]: unknown | undefined;
90
+ };
79
91
  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
- */
92
+ | ('None' | 'Consecutive' | 'AcrossEmptyLines' | 'AcrossComments' | 'AcrossEmptyLinesAndComments')
93
+ | {
94
+ /**
95
+ * Whether aligning is enabled.
96
+ */
97
+ Enabled?: boolean;
98
+ /**
99
+ * Whether to align across empty lines.
100
+ */
101
+ AcrossEmptyLines?: boolean;
102
+ /**
103
+ * Whether to align across comments.
104
+ */
105
+ AcrossComments?: boolean;
106
+ [k: string]: unknown | undefined;
107
+ };
90
108
  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";
109
+ | ('None' | 'Consecutive' | 'AcrossEmptyLines' | 'AcrossComments' | 'AcrossEmptyLinesAndComments')
110
+ | {
111
+ /**
112
+ * Whether aligning is enabled.
113
+ */
114
+ Enabled?: boolean;
115
+ /**
116
+ * Whether to align across empty lines.
117
+ */
118
+ AcrossEmptyLines?: boolean;
119
+ /**
120
+ * Whether to align across comments.
121
+ */
122
+ AcrossComments?: boolean;
123
+ /**
124
+ * Whether function pointers are aligned.
125
+ */
126
+ AlignFunctionPointers?: boolean;
127
+ [k: string]: unknown | undefined;
128
+ };
129
+ /**
130
+ * clang-format 17
131
+ *
132
+ * Style of aligning consecutive short case labels.
133
+ */
134
+ AlignConsecutiveShortCaseStatements?: {
135
+ /**
136
+ * Whether aligning is enabled.
137
+ */
138
+ Enabled?: boolean;
139
+ /**
140
+ * Whether to align across empty lines.
141
+ */
142
+ AcrossEmptyLines?: boolean;
143
+ /**
144
+ * Whether to align across comments.
145
+ */
146
+ AcrossComments?: boolean;
147
+ /**
148
+ * Whether aligned case labels are aligned on the colon or on the tokens after the colon.
149
+ */
150
+ AlignCaseColons?: boolean;
151
+ /**
152
+ * Whether to align the case arrows when aligning short case expressions.
153
+ */
154
+ AlignCaseArrows?: boolean;
155
+ [k: string]: unknown | undefined;
156
+ };
102
157
  /**
103
- * clang-format 3.5
104
-
105
- If true, horizontally align operands of binary and ternary expressions.
106
- */
107
- AlignOperands?: "Align" | "DontAlign" | "AlignAfterOperator";
158
+ * clang-format 5
159
+ *
160
+ * Options for aligning backslashes in escaped newlines.
161
+ */
162
+ AlignEscapedNewlines?: 'Left' | 'Right' | 'DontAlign' | 'LeftWithLastLine';
108
163
  /**
109
- * clang-format 3.7
110
-
111
- If true, aligns trailing comments.
112
- */
113
- AlignTrailingComments?: boolean;
164
+ * clang-format 3.5
165
+ *
166
+ * If true, horizontally align operands of binary and ternary expressions.
167
+ */
168
+ AlignOperands?: 'Align' | 'DontAlign' | 'AlignAfterOperator';
114
169
  /**
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
- */
170
+ * Control of trailing comments.
171
+ */
172
+ AlignTrailingComments?:
173
+ | boolean
174
+ | {
175
+ /**
176
+ * Specifies the way to align trailing comments.
177
+ */
178
+ Kind?: 'Leave' | 'Always' | 'Never';
179
+ /**
180
+ * How many empty lines to apply alignment.
181
+ */
182
+ OverEmptyLines?: number;
183
+ [k: string]: unknown | undefined;
184
+ };
185
+ /**
186
+ * clang-format 9
187
+ *
188
+ * 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.
189
+ */
119
190
  AllowAllArgumentsOnNextLine?: boolean;
120
191
  /**
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
- */
192
+ * clang-format 9
193
+ *
194
+ * This option is deprecated in clang-format 15. See NextLine of PackConstructorInitializers.
195
+ *
196
+ * 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.
197
+ */
127
198
  AllowAllConstructorInitializersOnNextLine?: boolean;
128
199
  /**
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
- */
200
+ * clang-format 3.3
201
+ *
202
+ * 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.
203
+ */
133
204
  AllowAllParametersOfDeclarationOnNextLine?: boolean;
134
205
  /**
135
- * clang-format 11
136
-
137
- Allow short enums on a single line.
138
- */
206
+ * clang-format 18
207
+ *
208
+ * Controls if there could be a line break before a noexcept specifier.
209
+ */
210
+ AllowBreakBeforeNoexceptSpecifier?: 'Never' | 'OnlyWithParen' | 'Always';
211
+ /**
212
+ * clang-format 11
213
+ *
214
+ * Allow short enums on a single line.
215
+ */
139
216
  AllowShortEnumsOnASingleLine?: boolean;
140
217
  /**
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";
218
+ * clang-format 3.5
219
+ *
220
+ * Dependent on the value, while (true) { continue; } can be put on a single line.
221
+ */
222
+ AllowShortBlocksOnASingleLine?: 'Never' | 'Empty' | 'Always';
146
223
  /**
147
- * clang-format 3.6
148
-
149
- If true, short case labels will be contracted to a single line.
150
- */
224
+ * clang-format 3.6
225
+ *
226
+ * If true, short case labels will be contracted to a single line.
227
+ */
151
228
  AllowShortCaseLabelsOnASingleLine?: boolean;
152
229
  /**
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";
230
+ * clang-format 18
231
+ *
232
+ * Allow short compound requirement on a single line.
233
+ */
234
+ AllowShortCompoundRequirementOnASingleLine?: boolean;
158
235
  /**
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";
236
+ * clang-format 3.5
237
+ *
238
+ * Dependent on the value, int f() { return 0; } can be put on a single line.
239
+ */
240
+ AllowShortFunctionsOnASingleLine?: 'All' | 'None' | 'Inline' | 'Empty' | 'InlineOnly';
164
241
  /**
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";
242
+ * clang-format 9
243
+ *
244
+ * Dependent on the value, auto lambda []() { return 0; } can be put on a single line.
245
+ */
246
+ AllowShortLambdasOnASingleLine?: 'None' | 'Empty' | 'Inline' | 'All';
170
247
  /**
171
- * clang-format 3.7
172
-
173
- If true, while (true) continue; can be put on a single line.
174
- */
175
- AllowShortLoopsOnASingleLine?: boolean;
248
+ * clang-format 3.3
249
+ *
250
+ * Dependent on the value, if (a) return; can be put on a single line.
251
+ */
252
+ AllowShortIfStatementsOnASingleLine?: 'AllIfsAndElse' | 'Never' | 'WithoutElse' | 'OnlyFirstIf';
176
253
  /**
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";
254
+ * clang-format 3.7
255
+ *
256
+ * If true, while (true) continue; can be put on a single line.
257
+ */
258
+ AllowShortLoopsOnASingleLine?: boolean;
184
259
  /**
185
- * clang-format 3.8
186
-
187
- The function declaration return type breaking style to use.
188
- */
189
- AlwaysBreakAfterReturnType?: "None" | "All" | "TopLevel" | "AllDefinitions" | "TopLevelDefinitions";
260
+ * clang-format 3.7
261
+ *
262
+ * This option is deprecated and is retained for backwards compatibility.
263
+ *
264
+ * The function definition return type breaking style to use. This option is deprecated and is retained for backwards compatibility
265
+ */
266
+ AlwaysBreakAfterDefinitionReturnType?: 'None' | 'All' | 'TopLevel';
190
267
  /**
191
- * clang-format 3.4
192
-
193
- If true, always break before multiline string literals.
194
- */
268
+ * clang-format 3.8
269
+ *
270
+ * Deprecated. This option is renamed to BreakAfterReturnType.
271
+ *
272
+ * The function declaration return type breaking style to use.
273
+ */
274
+ AlwaysBreakAfterReturnType?:
275
+ | 'Automatic'
276
+ | 'ExceptShortType'
277
+ | 'None'
278
+ | 'All'
279
+ | 'TopLevel'
280
+ | 'AllDefinitions'
281
+ | 'TopLevelDefinitions';
282
+ /**
283
+ * clang-format 3.4
284
+ *
285
+ * If true, always break before multiline string literals.
286
+ */
195
287
  AlwaysBreakBeforeMultilineStrings?: boolean;
196
288
  /**
197
- * clang-format 7
198
-
199
- The template declaration breaking style to use.
200
- */
201
- AlwaysBreakTemplateDeclarations?: "Yes" | "No" | "MultiLine";
289
+ * clang-format 7
290
+ *
291
+ * Deprecated. This option is renamed to BreakTemplateDeclarations.
292
+ *
293
+ * The template declaration breaking style to use.
294
+ */
295
+ AlwaysBreakTemplateDeclarations?: 'Leave' | 'No' | 'MultiLine' | 'Yes';
202
296
  /**
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
- */
297
+ * clang-format 12
298
+ *
299
+ * 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.
300
+ */
207
301
  AttributeMacros?: string[];
208
302
  /**
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
- */
303
+ * clang-format 3.7
304
+ *
305
+ * If false, a function call's arguments will either be all on the same line or will have one line each.
306
+ */
213
307
  BinPackArguments?: boolean;
214
308
  /**
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;
309
+ * clang-format 3.7
310
+ *
311
+ * The bin pack parameters style to use.
312
+ */
313
+ BinPackParameters?: 'BinPack' | 'OnePerLine' | 'AlwaysOnePerLine';
220
314
  /**
221
- * clang-format 12
222
-
223
- The BitFieldColonSpacingStyle to use for bitfields.
224
- */
225
- BitFieldColonSpacing?: "Both" | "None" | "Before" | "After";
315
+ * clang-format 12
316
+ *
317
+ * The BitFieldColonSpacingStyle to use for bitfields.
318
+ */
319
+ BitFieldColonSpacing?: 'Both' | 'None' | 'Before' | 'After';
226
320
  /**
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
- */
321
+ * clang-format 3.8
322
+ *
323
+ * Control of individual brace wrapping cases. If BreakBeforeBraces is set to Custom, use this to specify how each individual brace case should be handled. Otherwise, this is ignored.
324
+ */
231
325
  BraceWrapping?: {
232
326
  /**
233
- * bool AfterCaseLabel Wrap case labels.
327
+ * Wrap case labels.
234
328
  */
235
329
  AfterCaseLabel?: boolean;
236
330
  /**
237
- * bool AfterClass Wrap class definitions.
331
+ * Wrap class definitions.
238
332
  */
239
333
  AfterClass?: boolean;
240
334
  /**
241
- * AfterControlStatement Wrap control statements (if/for/while/switch/..).
335
+ * Wrap control statements (if/for/while/switch/...).
242
336
  */
243
- AfterControlStatement?: "Never" | "MultiLine" | "Always";
337
+ AfterControlStatement?: 'Never' | 'MultiLine' | 'Always';
244
338
  /**
245
- * bool AfterEnum Wrap enum definitions.
339
+ * Wrap enum definitions.
246
340
  */
247
341
  AfterEnum?: boolean;
248
342
  /**
249
- * bool AfterFunction Wrap function definitions.
343
+ * Wrap function definitions.
250
344
  */
251
345
  AfterFunction?: boolean;
252
346
  /**
253
- * bool AfterNamespace Wrap namespace definitions.
347
+ * Wrap namespace definitions.
254
348
  */
255
349
  AfterNamespace?: boolean;
256
350
  /**
257
- * bool AfterObjCDeclaration Wrap ObjC definitions (interfaces, implementations…). @autoreleasepool and @synchronized blocks are wrapped according to AfterControlStatement flag.
351
+ * Wrap ObjC definitions (interfaces, implementations…). @autoreleasepool and @synchronized blocks are wrapped according to AfterControlStatement flag.
258
352
  */
259
353
  AfterObjCDeclaration?: boolean;
260
354
  /**
261
- * bool AfterStruct Wrap struct definitions.
355
+ * Wrap struct definitions.
262
356
  */
263
357
  AfterStruct?: boolean;
264
358
  /**
265
- * bool AfterUnion Wrap union definitions.
359
+ * Wrap union definitions.
266
360
  */
267
361
  AfterUnion?: boolean;
268
362
  /**
269
- * bool AfterExternBlock Wrap extern blocks.
363
+ * Wrap extern blocks.
270
364
  */
271
365
  AfterExternBlock?: boolean;
272
366
  /**
273
- * bool BeforeCatch Wrap before catch.
367
+ * Wrap before catch.
274
368
  */
275
369
  BeforeCatch?: boolean;
276
370
  /**
277
- * bool BeforeElse Wrap before else.
371
+ * Wrap before else.
278
372
  */
279
373
  BeforeElse?: boolean;
280
374
  /**
281
- * bool BeforeLambdaBody Wrap lambda block.
375
+ * Wrap lambda block.
282
376
  */
283
377
  BeforeLambdaBody?: boolean;
284
378
  /**
285
- * bool BeforeWhile Wrap before while.
379
+ * Wrap before while.
286
380
  */
287
381
  BeforeWhile?: boolean;
288
382
  /**
289
- * bool IndentBraces Indent the wrapped braces themselves.
383
+ * Indent the wrapped braces themselves.
290
384
  */
291
385
  IndentBraces?: boolean;
292
386
  /**
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).
387
+ * 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
388
  */
295
389
  SplitEmptyFunction?: boolean;
296
390
  /**
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.
391
+ * 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
392
  */
299
393
  SplitEmptyRecord?: boolean;
300
394
  /**
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.
395
+ * 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
396
  */
303
397
  SplitEmptyNamespace?: boolean;
304
398
  [k: string]: unknown | undefined;
305
399
  };
306
400
  /**
307
- * clang-format 3.8
308
-
309
- Break after each annotation on a field in Java files.
310
- */
401
+ * clang-format 17
402
+ *
403
+ * The number of columns to use to indent the contents of braced init lists. If unset or negative, ContinuationIndentWidth is used.
404
+ */
405
+ BracedInitializerIndentWidth?: number;
406
+ /**
407
+ * clang-format 18
408
+ *
409
+ * Break between adjacent string literals.
410
+ */
411
+ BreakAdjacentStringLiterals?: boolean;
412
+ /**
413
+ * clang-format 16
414
+ *
415
+ * Break after a group of C++11 attributes before a function declaration/definition name.
416
+ */
417
+ BreakAfterAttributes?: 'Always' | 'Leave' | 'Never';
418
+ /**
419
+ * clang-format 3.8
420
+ *
421
+ * Break after each annotation on a field in Java files.
422
+ */
311
423
  BreakAfterJavaFieldAnnotations?: boolean;
312
424
  /**
313
- * clang-format 3.6
314
-
315
- The way to wrap binary operators.
316
- */
317
- BreakBeforeBinaryOperators?: "None" | "NonAssignment" | "All";
425
+ * clang-format 16
426
+ *
427
+ * If true, clang-format will always break after a Json array [ otherwise it will scan until the closing ] to determine if it should add newlines between elements (prettier compatible).
428
+ */
429
+ BreakArrays?: boolean;
318
430
  /**
319
- * clang-format 3.7
320
-
321
- The brace breaking style to use.
322
- */
431
+ * clang-format 16
432
+ *
433
+ * The inline ASM colon style to use..
434
+ */
435
+ BreakBeforeInlineASMColon?: 'Never' | 'OnlyMultiline' | 'Always';
436
+ /**
437
+ * clang-format 3.6
438
+ *
439
+ * The way to wrap binary operators.
440
+ */
441
+ BreakBeforeBinaryOperators?: 'None' | 'NonAssignment' | 'All';
442
+ /**
443
+ * clang-format 3.7
444
+ *
445
+ * The brace breaking style to use.
446
+ */
323
447
  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;
448
+ | 'Attach'
449
+ | 'Linux'
450
+ | 'Mozilla'
451
+ | 'Stroustrup'
452
+ | 'Allman'
453
+ | 'Whitesmiths'
454
+ | 'GNU'
455
+ | 'WebKit'
456
+ | 'Custom';
457
+ /**
458
+ * clang-format 12
459
+ *
460
+ * The concept declaration style to use.
461
+ */
462
+ BreakBeforeConceptDeclarations?: 'Never' | 'Allowed' | 'Always';
340
463
  /**
341
- * clang-format 3.7
342
-
343
- If true, ternary operators will be placed after line breaks.
344
- */
464
+ * clang-format 3.7
465
+ *
466
+ * If true, ternary operators will be placed after line breaks.
467
+ */
345
468
  BreakBeforeTernaryOperators?: boolean;
346
469
  /**
347
- * clang-format 5
348
-
349
- The constructor initializers style to use.
350
- */
351
- BreakConstructorInitializers?: "BeforeColon" | "BeforeComma" | "AfterColon";
470
+ * clang-format 5
471
+ *
472
+ * The constructor initializers style to use.
473
+ */
474
+ BreakConstructorInitializers?: 'BeforeColon' | 'BeforeComma' | 'AfterColon';
352
475
  /**
353
- * clang-format 7
354
-
355
- The inheritance list style to use.
356
- */
357
- BreakInheritanceList?: "BeforeColon" | "BeforeComma" | "AfterColon" | "AfterComma";
476
+ * clang-format 7
477
+ *
478
+ * The inheritance list style to use.
479
+ */
480
+ BreakInheritanceList?: 'BeforeColon' | 'BeforeComma' | 'AfterColon' | 'AfterComma';
358
481
  /**
359
- * clang-format 3.9
360
-
361
- Allow breaking string literals when formatting.
362
- */
482
+ * clang-format 3.9
483
+ *
484
+ * Allow breaking string literals when formatting.
485
+ */
363
486
  BreakStringLiterals?: boolean;
364
487
  /**
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
- */
488
+ * clang-format 3.7
489
+ *
490
+ * The column limit.
491
+ */
375
492
  ColumnLimit?: number;
376
493
  /**
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
- */
494
+ * clang-format 3.7
495
+ *
496
+ * A regular expression that describes comments with special meaning, which should not be split into lines or otherwise changed.
497
+ */
381
498
  CommentPragmas?: string;
382
499
  /**
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
- */
500
+ * clang-format 5
501
+ *
502
+ * If true, consecutive namespace declarations will be on the same line. If false, each namespace is declared on a new line.
503
+ */
387
504
  CompactNamespaces?: boolean;
388
505
  /**
389
- * clang-format 3.7
390
-
391
- This option is deprecated. See CurrentLine of PackConstructorInitializers.
392
- */
506
+ * clang-format 3.7
507
+ *
508
+ * This option is deprecated. See CurrentLine of PackConstructorInitializers.
509
+ */
393
510
  ConstructorInitializerAllOnOneLineOrOnePerLine?: boolean;
394
511
  /**
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
- */
512
+ * clang-format 3.7
513
+ *
514
+ * The number of characters to use for indentation of constructor initializer lists as well as inheritance lists.
515
+ */
399
516
  ConstructorInitializerIndentWidth?: number;
400
517
  /**
401
- * clang-format 3.7
402
-
403
- Indent width for line continuations.
404
- */
518
+ * clang-format 3.7
519
+ *
520
+ * Indent width for line continuations.
521
+ */
405
522
  ContinuationIndentWidth?: number;
406
523
  /**
407
- * clang-format 3.4
408
-
409
- If true, format braced lists as best suited for C++11 braced lists.
410
- */
524
+ * clang-format 3.4
525
+ *
526
+ * If true, format braced lists as best suited for C++11 braced lists.
527
+ */
411
528
  Cpp11BracedListStyle?: boolean;
412
529
  /**
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
- */
530
+ * clang-format 10
531
+ *
532
+ * Deprecated. See DeriveLF and DeriveCRLF of LineEnding.
533
+ */
419
534
  DeriveLineEnding?: boolean;
420
535
  /**
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
- */
536
+ * clang-format 3.7
537
+ *
538
+ * 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.
539
+ */
425
540
  DerivePointerAlignment?: boolean;
426
541
  /**
427
- * clang-format 3.7
428
-
429
- Disables formatting completely.
430
- */
542
+ * clang-format 3.7
543
+ *
544
+ * Disables formatting completely.
545
+ */
431
546
  DisableFormat?: boolean;
432
547
  /**
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";
548
+ * clang-format 13
549
+ *
550
+ * Defines when to put an empty line after access modifiers. EmptyLineBeforeAccessModifier configuration handles the number of empty lines between two access modifiers.
551
+ */
552
+ EmptyLineAfterAccessModifier?: 'Never' | 'Leave' | 'Always';
438
553
  /**
439
- * clang-format 12
440
-
441
- Defines in which cases to put empty line before access modifiers.
442
- */
443
- EmptyLineBeforeAccessModifier?: "LogicalBlock" | "Never" | "Leave" | "Always";
554
+ * clang-format 12
555
+ *
556
+ * Defines in which cases to put empty line before access modifiers.
557
+ */
558
+ EmptyLineBeforeAccessModifier?: 'LogicalBlock' | 'Never' | 'Leave' | 'Always';
444
559
  /**
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
- */
560
+ * clang-format 3.7
561
+ *
562
+ * If true, clang-format detects whether function calls and definitions are formatted with one parameter per line.
563
+ */
449
564
  ExperimentalAutoDetectBinPacking?: boolean;
450
565
  /**
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
- */
566
+ * clang-format 5
567
+ *
568
+ * If true, clang-format adds missing namespace end comments for namespaces and fixes invalid existing ones. This doesn't affect short namespaces, which are controlled by ShortNamespaceLines.
569
+ */
455
570
  FixNamespaceComments?: boolean;
456
571
  /**
457
- * clang-format 3.7
458
-
459
- A vector of macros that should be interpreted as foreach loops instead of as function calls.
460
- */
572
+ * clang-format 3.7
573
+ *
574
+ * A vector of macros that should be interpreted as foreach loops instead of as function calls.
575
+ */
461
576
  ForEachMacros?: string[];
462
577
  /**
463
- * clang-format 13
464
-
465
- A vector of macros that should be interpreted as conditionals instead of as function calls.
466
- */
578
+ * clang-format 13
579
+ *
580
+ * A vector of macros that should be interpreted as conditionals instead of as function calls.
581
+ */
467
582
  IfMacros?: string[];
468
583
  /**
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";
584
+ * clang-format 6
585
+ *
586
+ * Dependent on the value, multiple #include blocks can be sorted as one and divided based on category.
587
+ */
588
+ IncludeBlocks?: 'Regroup' | 'Preserve' | 'Merge';
474
589
  /**
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.
590
+ * clang-format 3.8
591
+ *
592
+ * Regular expressions denoting the different #include categories used for ordering #includes.
593
+ *
594
+ * POSIX extended regular expressions are supported.
595
+ *
596
+ * These regular expressions are matched against the filename of an include (including the <> or "") in order. The value belonging to the first matching regular expression is assigned and #includes are sorted first according to increasing category number and then alphabetically within each category.
597
+ *
598
+ * 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
599
  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.
600
+ *
601
+ * Each regular expression can be marked as case sensitive with the field CaseSensitive, per default it is not.
479
602
  */
480
603
  IncludeCategories?: {
481
604
  Regex: string;
@@ -485,632 +608,1056 @@ export interface ClangFormatConfig {
485
608
  [k: string]: unknown | undefined;
486
609
  }[];
487
610
  /**
488
- * clang-format 7
489
-
490
- Specify a regular expression of suffixes that are allowed in the file-to-main-include mapping.
611
+ * clang-format 3.9
612
+ *
613
+ * Specify a regular expression of suffixes that are allowed in the file-to-main-include mapping.
491
614
  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
615
  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
616
  */
494
617
  IncludeIsMainRegex?: string;
495
618
  /**
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.
619
+ * clang-format 10
620
+ *
621
+ * Specify a regular expression for files being formatted that are allowed to be considered "main" in the file-to-main-include mapping.
499
622
  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
623
  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
624
  */
502
625
  IncludeIsMainSourceRegex?: string;
503
626
  /**
504
627
  * clang-format 13
505
-
506
- Specify whether access modifiers should have their own indentation level.
628
+ *
629
+ * Specify whether access modifiers should have their own indentation level.
507
630
  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
631
  */
509
632
  IndentAccessModifiers?: boolean;
510
633
  /**
511
634
  * clang-format 11
512
-
513
- Indent case label blocks one level from the case label.
635
+ *
636
+ * Indent case label blocks one level from the case label.
514
637
  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
638
  */
516
639
  IndentCaseBlocks?: boolean;
517
640
  /**
518
641
  * clang-format 3.3
519
-
520
- Indent case labels one level from the switch statement.
642
+ *
643
+ * Indent case labels one level from the switch statement.
521
644
  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
645
  */
523
646
  IndentCaseLabels?: boolean;
524
647
  /**
525
- * clang-format 11
526
-
527
- IndentExternBlockStyle is the type of indenting of extern blocks.
528
- */
529
- IndentExternBlock?: "AfterExternBlock" | "NoIndent" | "Indent";
648
+ * clang-format 11
649
+ *
650
+ * IndentExternBlockStyle is the type of indenting of extern blocks.
651
+ */
652
+ IndentExternBlock?: 'AfterExternBlock' | 'NoIndent' | 'Indent';
530
653
  /**
531
654
  * clang-format 10
532
-
533
- Indent goto labels.
655
+ *
656
+ * Indent goto labels.
534
657
  When false, goto labels are flushed left.
535
658
  */
536
659
  IndentGotoLabels?: boolean;
537
660
  /**
538
- * clang-format 6
539
-
540
- The preprocessor directive indenting style to use.
541
- */
542
- IndentPPDirectives?: "None" | "AfterHash" | "BeforeHash";
661
+ * clang-format 6
662
+ *
663
+ * The preprocessor directive indenting style to use.
664
+ */
665
+ IndentPPDirectives?: 'None' | 'AfterHash' | 'BeforeHash';
543
666
  /**
544
- * clang-format 15
545
-
546
- Indent the requires clause in a template. This only applies when RequiresClausePosition is OwnLine, or WithFollowing.
547
- */
667
+ * clang-format 15
668
+ *
669
+ * Indent the requires clause in a template. This only applies when RequiresClausePosition is OwnLine, or WithFollowing.
670
+ */
548
671
  IndentRequiresClause?: boolean;
549
672
  /**
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
- */
673
+ * clang-format 12-14
674
+ *
675
+ * 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.
676
+ */
554
677
  IndentRequires?: boolean;
555
678
  /**
556
- * clang-format 3.7
557
-
558
- The number of columns to use for indentation.
559
- */
679
+ * clang-format 3.7
680
+ *
681
+ * The number of columns to use for indentation.
682
+ */
560
683
  IndentWidth?: number;
561
684
  /**
562
- * clang-format 3.7
563
-
564
- Indent if a function definition or declaration is wrapped after the type.
565
- */
685
+ * clang-format 3.7
686
+ *
687
+ * Indent if a function definition or declaration is wrapped after the type.
688
+ */
566
689
  IndentWrappedFunctionNames?: boolean;
567
690
  /**
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
- */
691
+ * clang-format 15
692
+ *
693
+ * 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.
694
+ *
695
+ * 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.
696
+ */
573
697
  InsertBraces?: boolean;
574
698
  /**
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";
699
+ * clang-format 16
700
+ *
701
+ * Insert a newline at end of file if missing.
702
+ */
703
+ InsertNewlineAtEOF?: boolean;
580
704
  /**
581
- * clang-format 8
582
-
583
- The JavaScriptQuoteStyle to use for JavaScript strings.
584
- */
585
- JavaImportGroup?: unknown[];
705
+ * clang-format 11
706
+ *
707
+ * 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.
708
+ */
709
+ InsertTrailingCommas?: 'None' | 'Wrapped';
710
+ /**
711
+ * clang-format 16
712
+ *
713
+ * Format integer literal separators (' for C++ and _ for C#, Java, and JavaScript).
714
+ *
715
+ * Separator format of integer literals of different bases. If negative, remove separators. If 0, leave the literal as is. If positive, insert separators between digits starting from the rightmost digit.
716
+ *
717
+ * You can also specify a minimum number of digits (BinaryMinDigits, DecimalMinDigits, and HexMinDigits) the integer literal must have in order for the separators to be inserted.
718
+ */
719
+ IntegerLiteralSeparator?: {
720
+ /**
721
+ * Format separators in binary literals.
722
+ */
723
+ Binary?: number;
724
+ /**
725
+ * Format separators in binary literals with a minimum number of digits.
726
+ */
727
+ BinaryMinDigits?: number;
728
+ /**
729
+ * Format separators in decimal literals.
730
+ */
731
+ Decimal?: number;
732
+ /**
733
+ * Format separators in decimal literals with a minimum number of digits.
734
+ */
735
+ DecimalMinDigits?: number;
736
+ /**
737
+ * Format separators in hexadecimal literals
738
+ */
739
+ Hex?: number;
740
+ /**
741
+ * Format separators in hexadecimal literals with a minimum number of digits.
742
+ */
743
+ HexMinDigits?: number;
744
+ [k: string]: unknown | undefined;
745
+ };
586
746
  /**
587
- * clang-fromat 3.9
588
-
589
- The JavaScriptQuoteStyle to use for JavaScript strings.
590
- */
591
- JavaScriptQuotes?: "Leave" | "Single" | "Double";
747
+ * clang-format 3.9
748
+ *
749
+ * The JavaScriptQuoteStyle to use for JavaScript strings.
750
+ */
751
+ JavaScriptQuotes?: 'Leave' | 'Single' | 'Double';
592
752
  /**
593
- * clang-format 3.9
594
-
595
- Whether to wrap JavaScript import/export statements.
596
- */
753
+ * clang-format 3.9
754
+ *
755
+ * Whether to wrap JavaScript import/export statements.
756
+ */
597
757
  JavaScriptWrapImports?: boolean;
598
758
  /**
599
- * clang-format 3.7
600
-
601
- If true, the empty line at the start of blocks is kept.
602
- */
759
+ * clang-format 17
760
+ *
761
+ * This option is deprecated. See AtEndOfFile of KeepEmptyLines.
762
+ */
763
+ KeepEmptyLinesAtEOF?: boolean;
764
+ /**
765
+ * clang-format 3.7
766
+ *
767
+ * This option is deprecated. See AtStartOfBlock of KeepEmptyLines.
768
+ */
603
769
  KeepEmptyLinesAtTheStartOfBlocks?: boolean;
604
770
  /**
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";
771
+ * clang-format 13
772
+ *
773
+ * 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.
774
+ */
775
+ LambdaBodyIndentation?: 'Signature' | 'OuterScope';
610
776
  /**
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";
777
+ * clang-format 3.5
778
+ *
779
+ * Language, this format style is targeted at.
780
+ */
781
+ Language?:
782
+ | 'None'
783
+ | 'C'
784
+ | 'Cpp'
785
+ | 'CSharp'
786
+ | 'Java'
787
+ | 'JavaScript'
788
+ | 'Json'
789
+ | 'ObjC'
790
+ | 'Proto'
791
+ | 'TableGen'
792
+ | 'TextProto'
793
+ | 'Verilog';
794
+ /**
795
+ * clang-format 16
796
+ *
797
+ * Line ending style (\n or \r\n) to use.
798
+ */
799
+ LineEnding?: 'LF' | 'CRLF' | 'DeriveLF' | 'DeriveCRLF';
616
800
  /**
617
- * clang-format 3.7
618
-
619
- A regular expression matching macros that start a block.
620
- */
801
+ * clang-format 3.7
802
+ *
803
+ * A regular expression matching macros that start a block.
804
+ */
621
805
  MacroBlockBegin?: string;
622
806
  /**
623
- * clang-format 3.7
624
-
625
- A regular expression matching macros that end a block.
626
- */
807
+ * clang-format 3.7
808
+ *
809
+ * A regular expression matching macros that end a block.
810
+ */
627
811
  MacroBlockEnd?: string;
628
812
  /**
629
- * clang-format 3.7
630
-
631
- The maximum number of consecutive empty lines to keep.
632
- */
813
+ * clang-format 17
814
+ *
815
+ * A list of macros of the form <definition>=<expansion>.
816
+ *
817
+ * Code will be parsed with macros expanded, in order to determine how to interpret and format the macro arguments.
818
+ */
819
+ Macros?: string[];
820
+ /**
821
+ * clang-format 3.7
822
+ *
823
+ * The maximum number of consecutive empty lines to keep.
824
+ */
633
825
  MaxEmptyLinesToKeep?: number;
634
826
  /**
635
- * clnag-format 3.7
636
-
637
- The indentation used for namespaces.
638
- */
639
- NamespaceIndentation?: "None" | "Inner" | "All";
827
+ * clang-format 3.7
828
+ *
829
+ * The indentation used for namespaces.
830
+ */
831
+ NamespaceIndentation?: 'None' | 'Inner' | 'All';
640
832
  /**
641
- * clnag-format 9
642
-
643
- A vector of macros which are used to open namespace blocks.
644
- */
833
+ * clang-format 9
834
+ *
835
+ * A vector of macros which are used to open namespace blocks.
836
+ */
645
837
  NamespaceMacros?: string[];
646
838
  /**
647
839
  * 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.
840
+ *
841
+ * 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
842
  If Always, always bin-packs Objective-C protocol conformance list items into as few lines as possible whenever they go over ColumnLimit.
651
843
  If Never, lays out Objective-C protocol conformance list items onto individual lines whenever they go over ColumnLimit.
652
844
  */
653
- ObjCBinPackProtocolList?: "Never" | "Auto" | "Always";
845
+ ObjCBinPackProtocolList?: 'Never' | 'Auto' | 'Always';
654
846
  /**
655
- * clang-format 3.7
656
-
657
- The number of characters to use for indentation of ObjC blocks.
658
- */
847
+ * clang-format 3.7
848
+ *
849
+ * The number of characters to use for indentation of ObjC blocks.
850
+ */
659
851
  ObjCBlockIndentWidth?: number;
660
852
  /**
661
- * clang-format 11
662
-
663
- Break parameters list into lines when there is nested block parameters in a function call.
664
- */
853
+ * clang-format 11
854
+ *
855
+ * Break parameters list into lines when there is nested block parameters in a function call.
856
+ */
665
857
  ObjCBreakBeforeNestedBlockParam?: boolean;
666
858
  /**
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
- */
859
+ * clang-format 18
860
+ *
861
+ * The order in which ObjC property attributes should appear.
862
+ *
863
+ * Attributes in code will be sorted in the order specified. Any attributes encountered that are not mentioned in this array will be sorted last, in stable order. Comments between attributes will leave the attributes untouched.
864
+ */
865
+ ObjCPropertyAttributeOrder?: string[];
866
+ /**
867
+ * clang-format 3.7
868
+ *
869
+ * Add a space after @property in Objective-C, i.e. use @property (readonly) instead of @property(readonly).
870
+ */
671
871
  ObjCSpaceAfterProperty?: boolean;
672
872
  /**
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
- */
873
+ * clang-format 3.7
874
+ *
875
+ * Add a space in front of an Objective-C protocol list, i.e. use Foo <Protocol> instead of Foo<Protocol>.
876
+ */
677
877
  ObjCSpaceBeforeProtocolList?: boolean;
678
878
  /**
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
- */
879
+ * clang-format 13
880
+ *
881
+ * The number of columns to use for indentation of preprocessor statements. When set to -1 (default) IndentWidth is used also for preprocessor statements.
882
+ */
683
883
  PPIndentWidth?: number;
684
884
  /**
685
- * clang-format 14
686
-
687
- The pack constructor initializers style to use.
688
- */
689
- PackConstructorInitializers?: "Never" | "BinPack" | "CurrentLine" | "NextLine";
885
+ * clang-format 14
886
+ *
887
+ * The pack constructor initializers style to use.
888
+ */
889
+ PackConstructorInitializers?: 'Never' | 'BinPack' | 'CurrentLine' | 'NextLine' | 'NextLineOnly';
690
890
  /**
691
- * clang-format 5
692
-
693
- The penalty for breaking around an assignment operator.
694
- */
891
+ * clang-format 5
892
+ *
893
+ * The penalty for breaking around an assignment operator.
894
+ */
695
895
  PenaltyBreakAssignment?: number;
696
896
  /**
697
- * clang-format 3.7
698
-
699
- The penalty for breaking a function call after call(.
700
- */
897
+ * clang-format 3.7
898
+ *
899
+ * The penalty for breaking a function call after call(.
900
+ */
701
901
  PenaltyBreakBeforeFirstCallParameter?: number;
702
902
  /**
703
- * clang-format 3.7
704
-
705
- The penalty for each line break introduced inside a comment.
706
- */
903
+ * clang-format 3.7
904
+ *
905
+ * The penalty for each line break introduced inside a comment.
906
+ */
707
907
  PenaltyBreakComment?: number;
708
908
  /**
709
- * clang-format 3.7
710
-
711
- The penalty for breaking before the first <<.
712
- */
909
+ * clang-format 3.7
910
+ *
911
+ * The penalty for breaking before the first <<.
912
+ */
713
913
  PenaltyBreakFirstLessLess?: number;
714
914
  /**
715
- * clang-format 14
716
-
717
- The penalty for breaking after (.
718
- */
915
+ * clang-format 14
916
+ *
917
+ * The penalty for breaking after (.
918
+ */
719
919
  PenaltyBreakOpenParenthesis?: number;
720
920
  /**
721
- * clang-format 3.7
722
-
723
- The penalty for each line break introduced inside a string literal.
724
- */
921
+ * clang-format 18
922
+ *
923
+ * The penalty for breaking after ::.
924
+ */
925
+ PenaltyBreakScopeResolution?: number;
926
+ /**
927
+ * clang-format 3.7
928
+ *
929
+ * The penalty for each line break introduced inside a string literal.
930
+ */
725
931
  PenaltyBreakString?: number;
726
932
  /**
727
- * clang-format 7
728
-
729
- The penalty for breaking after template declaration.
730
- */
933
+ * clang-format 7
934
+ *
935
+ * The penalty for breaking after template declaration.
936
+ */
731
937
  PenaltyBreakTemplateDeclaration?: number;
732
938
  /**
733
- * clang-format 3.7
734
-
735
- The penalty for each character outside of the column limit.
736
- */
939
+ * clang-format 3.7
940
+ *
941
+ * The penalty for each character outside of the column limit.
942
+ */
737
943
  PenaltyExcessCharacter?: number;
738
944
  /**
739
- * clang-format 12
740
-
741
- Penalty for each character of whitespace indentation (counted relative to leading non-whitespace column).
742
- */
945
+ * clang-format 12
946
+ *
947
+ * Penalty for each character of whitespace indentation (counted relative to leading non-whitespace column).
948
+ */
743
949
  PenaltyIndentedWhitespace?: number;
744
950
  /**
745
- * clang-format 3.7
746
-
747
- Penalty for putting the return type of a function onto its own line.
748
- */
951
+ * clang-format 3.7
952
+ *
953
+ * Penalty for putting the return type of a function onto its own line.
954
+ */
749
955
  PenaltyReturnTypeOnItsOwnLine?: number;
750
956
  /**
751
- * clang-format 3.7
752
-
753
- Pointer and reference alignment style.
754
- */
755
- PointerAlignment?: "Left" | "Right" | "Middle";
957
+ * clang-format 3.7
958
+ *
959
+ * Pointer and reference alignment style.
960
+ */
961
+ PointerAlignment?: 'Left' | 'Right' | 'Middle';
756
962
  /**
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";
963
+ * clang-format 14
964
+ *
965
+ * Different ways to arrange specifiers and qualifiers (e.g. const/volatile).
966
+ *
967
+ * 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. As such extra care should be taken to review code changes made by the use of this option.
968
+ */
969
+ QualifierAlignment?: 'Leave' | 'Left' | 'Right' | 'Custom';
766
970
  /**
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")[];
971
+ * clang-format 14
972
+ *
973
+ * The order in which the qualifiers appear. Order is an array that can contain any of the following.
974
+ *
975
+ * 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.
976
+ */
977
+ QualifierOrder?: ('const' | 'inline' | 'static' | 'friend' | 'constexpr' | 'volatile' | 'restrict' | 'type')[];
774
978
  /**
775
- * clang-format 6
776
-
777
- Defines hints for detecting supported languages code blocks in raw strings.
778
- */
979
+ * clang-format 6
980
+ *
981
+ * Defines hints for detecting supported languages code blocks in raw strings.
982
+ */
779
983
  RawStringFormats?: {
780
984
  /**
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";
985
+ * clang-format 3.5
986
+ *
987
+ * Language, this format style is targeted at.
988
+ */
989
+ Language?:
990
+ | 'None'
991
+ | 'C'
992
+ | 'Cpp'
993
+ | 'CSharp'
994
+ | 'Java'
995
+ | 'JavaScript'
996
+ | 'Json'
997
+ | 'ObjC'
998
+ | 'Proto'
999
+ | 'TableGen'
1000
+ | 'TextProto'
1001
+ | 'Verilog';
786
1002
  Delimiters?: string[];
787
1003
  CanonicalDelimiter?: string;
788
1004
  /**
789
1005
  * The style used for all options not specifically set in the configuration.
790
1006
  */
791
1007
  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";
1008
+ | 'Chromium'
1009
+ | 'Google'
1010
+ | 'LLVM'
1011
+ | 'Mozilla'
1012
+ | 'WebKit'
1013
+ | 'Microsoft'
1014
+ | 'GNU'
1015
+ | 'InheritParentConfig'
1016
+ | 'chromium'
1017
+ | 'google'
1018
+ | 'llvm'
1019
+ | 'mozilla'
1020
+ | 'webkit'
1021
+ | 'microsoft'
1022
+ | 'gnu'
1023
+ | 'inheritparentconfig';
808
1024
  EnclosingFunctions?: string[];
809
1025
  [k: string]: unknown | undefined;
810
1026
  }[];
811
1027
  /**
812
- * clang-format 13
813
-
814
- Reference alignment style (overrides PointerAlignment for references).
815
- */
816
- ReferenceAlignment?: "Pointer" | "Left" | "Right" | "Middle";
1028
+ * clang-format 13
1029
+ *
1030
+ * Reference alignment style (overrides PointerAlignment for references).
1031
+ */
1032
+ ReferenceAlignment?: 'Pointer' | 'Left' | 'Right' | 'Middle';
817
1033
  /**
818
- * clang-format 4
819
-
820
- If true, clang-format will attempt to re-flow comments.
821
- */
822
- ReflowComments?: boolean;
1034
+ * clang-format 3.8
1035
+ *
1036
+ * Comment reformatting style.
1037
+ */
1038
+ ReflowComments?: 'Never' | 'IndentOnly' | 'Always';
823
1039
  /**
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
- */
1040
+ * clang-format 16
1041
+ *
1042
+ * Remove semicolons after the closing brace of a non-empty function.
1043
+ *
1044
+ * 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.
1045
+ */
1046
+ RemoveSemicolon?: boolean;
1047
+ /**
1048
+ * clang-format 14
1049
+ *
1050
+ * Remove optional braces of control statements (if, else, for, and while) in C++ according to the LLVM coding style.
1051
+ *
1052
+ * Warning: This option will be renamed and expanded to support other styles.
1053
+ *
1054
+ * 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.
1055
+ */
832
1056
  RemoveBracesLLVM?: boolean;
833
1057
  /**
834
- * clang-format 15
835
-
836
- The position of the requires clause.
837
- */
838
- RequiresClausePosition?: "OwnLine" | "WithPreceding" | "WithFollowing" | "SingleLine";
1058
+ * clang-format 17
1059
+ *
1060
+ * Remove redundant parentheses.
1061
+ *
1062
+ * Warning: Setting this option to any value other than Leave 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.
1063
+ */
1064
+ RemoveParentheses?: 'Leave' | 'MultipleParentheses' | 'ReturnStatement';
839
1065
  /**
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";
1066
+ * clang-format 15
1067
+ *
1068
+ * The position of the requires clause.
1069
+ */
1070
+ RequiresClausePosition?: 'OwnLine' | 'OwnLineWithBrace' | 'WithPreceding' | 'WithFollowing' | 'SingleLine';
845
1071
  /**
846
- * clang-format 13
847
-
848
- The maximal number of unwrapped lines that a short namespace spans. Defaults to 1.
849
- */
1072
+ * clang-format 16
1073
+ *
1074
+ * The indentation used for requires expression bodies.
1075
+ */
1076
+ RequiresExpressionIndentation?: 'OuterScope' | 'Keyword';
1077
+ /**
1078
+ * clang-format 14
1079
+ *
1080
+ * Specifies the use of empty lines to separate definition blocks, including classes, structs, enums, and functions.
1081
+ */
1082
+ SeparateDefinitionBlocks?: 'Leave' | 'Always' | 'Never';
1083
+ /**
1084
+ * clang-format 13
1085
+ *
1086
+ * The maximal number of unwrapped lines that a short namespace spans. Defaults to 1.
1087
+ */
850
1088
  ShortNamespaceLines?: number;
851
1089
  /**
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";
1090
+ * clang-format 18
1091
+ *
1092
+ * Do not format macro definition body.
1093
+ */
1094
+ SkipMacroDefinitionBody?: boolean;
857
1095
  /**
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";
1096
+ * clang-format 3.8
1097
+ *
1098
+ * Controls if and how clang-format will sort #includes.
1099
+ */
1100
+ SortIncludes?: {
1101
+ /**
1102
+ * If true, includes are sorted based on the other suboptions.
1103
+ */
1104
+ Enabled?: boolean;
1105
+ /**
1106
+ * Whether or not includes are sorted in a case-insensitive fashion.
1107
+ */
1108
+ IgnoreCase?: boolean;
1109
+ [k: string]: unknown | undefined;
1110
+ };
863
1111
  /**
864
- * clang-format 5
865
-
866
- If true, clang-format will sort using declarations.
867
- */
868
- SortUsingDeclarations?: boolean;
1112
+ * clang-format 12
1113
+ *
1114
+ * 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.
1115
+ */
1116
+ SortJavaStaticImport?: 'Before' | 'After';
869
1117
  /**
870
- * clang-format 3.5
871
-
872
- If true, a space is inserted after C style casts.
873
- */
1118
+ * clang-format 5
1119
+ *
1120
+ * Controls if and how clang-format will sort using declarations.
1121
+ */
1122
+ SortUsingDeclarations?: 'Never' | 'Lexicographic' | 'LexicographicNumeric';
1123
+ /**
1124
+ * clang-format 3.5
1125
+ *
1126
+ * If true, a space is inserted after C style casts.
1127
+ */
874
1128
  SpaceAfterCStyleCast?: boolean;
875
1129
  /**
876
- * clang-format 9
877
-
878
- If true, a space is inserted after the logical not operator (!).
879
- */
1130
+ * clang-format 9
1131
+ *
1132
+ * If true, a space is inserted after the logical not operator (!).
1133
+ */
880
1134
  SpaceAfterLogicalNot?: boolean;
881
1135
  /**
882
- * clang-format 4
883
-
884
- If true, a space will be inserted after the 'template' keyword.
885
- */
1136
+ * clang-format 4
1137
+ *
1138
+ * If true, a space will be inserted after the template keyword.
1139
+ */
886
1140
  SpaceAfterTemplateKeyword?: boolean;
887
1141
  /**
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";
1142
+ * clang-format 12
1143
+ *
1144
+ * Defines in which cases to put a space before or after pointer qualifiers
1145
+ */
1146
+ SpaceAroundPointerQualifiers?: 'Default' | 'Before' | 'After' | 'Both';
893
1147
  /**
894
- * clang-format 3.7
895
-
896
- If false, spaces will be removed before assignment operators.
897
- */
1148
+ * clang-format 3.7
1149
+ *
1150
+ * If false, spaces will be removed before assignment operators.
1151
+ */
898
1152
  SpaceBeforeAssignmentOperators?: boolean;
899
1153
  /**
900
- * clang-format 12
901
-
902
- If false, spaces will be removed before case colon.
903
- */
1154
+ * clang-format 12
1155
+ *
1156
+ * If false, spaces will be removed before case colon.
1157
+ */
904
1158
  SpaceBeforeCaseColon?: boolean;
905
1159
  /**
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
- */
1160
+ * clang-format 7
1161
+ *
1162
+ * If true, a space will be inserted before a C++11 braced list used to initialize an object (after the preceding identifier or type).
1163
+ */
910
1164
  SpaceBeforeCpp11BracedList?: boolean;
911
1165
  /**
912
- * clang-format 7
913
-
914
- If false, spaces will be removed before constructor initializer colon.
915
- */
1166
+ * clang-format 7
1167
+ *
1168
+ * If false, spaces will be removed before constructor initializer colon.
1169
+ */
916
1170
  SpaceBeforeCtorInitializerColon?: boolean;
917
1171
  /**
918
- * clang-format 7
919
-
920
- If false, spaces will be removed before inheritance colon.
921
- */
1172
+ * clang-format 7
1173
+ *
1174
+ * If false, spaces will be removed before inheritance colon.
1175
+ */
922
1176
  SpaceBeforeInheritanceColon?: boolean;
923
1177
  /**
924
- * clang-format 3.5
925
-
926
- Defines in which cases to put a space before opening parentheses.
927
- */
1178
+ * clang-format 17
1179
+ *
1180
+ * If true, a space will be added before a JSON colon. For other languages, e.g. JavaScript, use SpacesInContainerLiterals instead.
1181
+ */
1182
+ SpaceBeforeJsonColon?: boolean;
1183
+ /**
1184
+ * clang-format 3.5
1185
+ *
1186
+ * Defines in which cases to put a space before opening parentheses.
1187
+ */
928
1188
  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
- */
1189
+ | 'ControlStatements'
1190
+ | 'Never'
1191
+ | 'ControlStatementsExceptControlMacros'
1192
+ | 'NonEmptyParentheses'
1193
+ | 'Always'
1194
+ | 'Custom';
1195
+ /**
1196
+ * clang-format 14
1197
+ *
1198
+ * Control of individual space before parentheses.
1199
+ *
1200
+ * If SpaceBeforeParens is set to Custom, use this to specify how each individual space before parentheses case should be handled. Otherwise, this is ignored.
1201
+ */
942
1202
  SpaceBeforeParensOptions?: {
943
1203
  /**
944
- * bool AfterControlStatements If true, put space betwee control statement keywords (for/if/while…) and opening parentheses.
1204
+ * If true, put space between control statement keywords (for/if/while…) and opening parentheses.
945
1205
  */
946
1206
  AfterControlStatements?: boolean;
947
1207
  /**
948
- * bool AfterForeachMacros If true, put space between foreach macros and opening parentheses.
1208
+ * If true, put space between foreach macros and opening parentheses.
949
1209
  */
950
1210
  AfterForeachMacros?: boolean;
951
1211
  /**
952
- * bool AfterFunctionDeclarationName If true, put a space between function declaration name and opening parentheses.
1212
+ * If true, put a space between function declaration name and opening parentheses.
953
1213
  */
954
1214
  AfterFunctionDeclarationName?: boolean;
955
1215
  /**
956
- * bool AfterFunctionDefinitionName If true, put a space between function definition name and opening parentheses.
1216
+ * If true, put a space between function definition name and opening parentheses.
957
1217
  */
958
1218
  AfterFunctionDefinitionName?: boolean;
959
1219
  /**
960
- * bool AfterIfMacros If true, put space between if macros and opening parentheses.
1220
+ * If true, put space between if macros and opening parentheses.
961
1221
  */
962
1222
  AfterIfMacros?: boolean;
963
1223
  /**
964
- * bool AfterOverloadedOperator If true, put a space between operator overloading and opening parentheses.
1224
+ * If true, put a space between operator overloading and opening parentheses.
965
1225
  */
966
1226
  AfterOverloadedOperator?: boolean;
967
1227
  /**
968
- * bool AfterRequiresInClause If true, put space between requires keyword in a requires clause and opening parentheses, if there is one.
1228
+ * If true, put a space between operator new/delete and opening parenthesis.
1229
+ */
1230
+ AfterPlacementOperator?: boolean;
1231
+ /**
1232
+ * If true, put space between requires keyword in a requires clause and opening parentheses, if there is one.
969
1233
  */
970
1234
  AfterRequiresInClause?: boolean;
971
1235
  /**
972
- * bool AfterRequiresInExpression If true, put space between requires keyword in a requires expression and opening parentheses.
1236
+ * If true, put space between requires keyword in a requires expression and opening parentheses.
973
1237
  */
974
1238
  AfterRequiresInExpression?: boolean;
975
1239
  /**
976
- * bool BeforeNonEmptyParentheses If true, put a space before opening parentheses only if the parentheses are not empty.
1240
+ * If true, put a space before opening parentheses only if the parentheses are not empty.
977
1241
  */
978
1242
  BeforeNonEmptyParentheses?: boolean;
1243
+ /**
1244
+ * If true, put a space between alternative operator not and the opening parenthesis.
1245
+ */
1246
+ AfterNot?: boolean;
979
1247
  [k: string]: unknown | undefined;
980
1248
  };
981
1249
  /**
982
- * clang-format 7
983
-
984
- If false, spaces will be removed before range-based for loop colon.
985
- */
1250
+ * clang-format 7
1251
+ *
1252
+ * If false, spaces will be removed before range-based for loop colon.
1253
+ */
986
1254
  SpaceBeforeRangeBasedForLoopColon?: boolean;
987
1255
  /**
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
- */
1256
+ * clang-format 10
1257
+ *
1258
+ * If true, spaces will be before [. Lambdas will not be affected. Only the first [ will get a space added.
1259
+ */
992
1260
  SpaceBeforeSquareBrackets?: boolean;
993
1261
  /**
994
- * clang-format 10
995
-
996
- If true, spaces will be inserted into {}.
997
- */
1262
+ * clang-format 10
1263
+ *
1264
+ * If true, spaces will be inserted into {}.
1265
+ */
998
1266
  SpaceInEmptyBlock?: boolean;
999
1267
  /**
1000
- * clang-format 3.7
1001
-
1002
- If true, spaces may be inserted into ().
1003
- */
1268
+ * clang-format 3.7
1269
+ *
1270
+ * If true, spaces may be inserted into (). This option is deprecated in clang-format 17. See InEmptyParentheses of SpacesInParensOptions.
1271
+ */
1004
1272
  SpaceInEmptyParentheses?: boolean;
1005
1273
  /**
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
- */
1274
+ * clang-format 3.7
1275
+ *
1276
+ * The number of spaces before trailing line comments (// - comments).
1277
+ *
1278
+ * This does not affect trailing block comments (/* - comments) as those commonly have different usage patterns and a number of special cases. In the case of Verilog, it doesn't affect a comment right after the opening parenthesis in the port or parameter list in a module header, because it is probably for the port on the following line instead of the parenthesis it follows.
1279
+ */
1012
1280
  SpacesBeforeTrailingComments?: number;
1013
1281
  /**
1014
- * clang-format 3.4
1015
-
1016
- The SpacesInAnglesStyle to use for template argument lists.
1017
- */
1018
- SpacesInAngles?: "Never" | "Always" | "Leave";
1282
+ * clang-format 3.4
1283
+ *
1284
+ * The SpacesInAnglesStyle to use for template argument lists.
1285
+ */
1286
+ SpacesInAngles?: 'Never' | 'Always' | 'Leave';
1019
1287
  /**
1020
- * clang-format 3.7
1021
-
1022
- If true, spaces may be inserted into C style casts.
1023
- */
1288
+ * clang-format 3.7
1289
+ *
1290
+ * If true, spaces may be inserted into C style casts. This option is deprecated in clang-format 17. See InCStyleCasts of SpacesInParensOptions.
1291
+ */
1024
1292
  SpacesInCStyleCastParentheses?: boolean;
1025
1293
  /**
1026
- * clang-format 10
1027
-
1028
- If true, spaces will be inserted around if/for/switch/while conditions.
1029
- */
1294
+ * clang-format 10
1295
+ *
1296
+ * If true, spaces will be inserted around if/for/switch/while conditions. This option is deprecated in clang-format 17. See InConditionalStatements of SpacesInParensOptions.
1297
+ */
1030
1298
  SpacesInConditionalStatement?: boolean;
1031
1299
  /**
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
- */
1300
+ * clang-format 3.7
1301
+ *
1302
+ * If true, spaces are inserted inside container literals (e.g. ObjC and Javascript array and dict literals). For JSON, use SpaceBeforeJsonColon instead.
1303
+ */
1036
1304
  SpacesInContainerLiterals?: boolean;
1037
1305
  /**
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
- */
1306
+ * clang-format 13
1307
+ *
1308
+ * 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.
1309
+ *
1310
+ * In clang-format 16, this option has only effect if ReflowComments is set to true.
1311
+ */
1042
1312
  SpacesInLineCommentPrefix?: {
1043
1313
  Minimum?: number;
1044
1314
  Maximum?: number;
1045
1315
  [k: string]: unknown | undefined;
1046
1316
  };
1047
1317
  /**
1048
- * clang-format 3.7
1049
-
1050
- If true, spaces will be inserted after ( and before ).
1051
- */
1318
+ * clang-format 17
1319
+ *
1320
+ * Defines in which cases spaces will be inserted after ( and before ).
1321
+ */
1322
+ SpacesInParens?: 'Never' | 'Custom';
1323
+ /**
1324
+ * clang-format 17
1325
+ *
1326
+ * Control of individual spaces in parentheses.
1327
+ *
1328
+ * If SpacesInParens is set to Custom, use this to specify how each individual space in parentheses case should be handled. Otherwise, this is ignored.
1329
+ */
1330
+ SpacesInParensOptions?: {
1331
+ InConditionalStatements?: boolean;
1332
+ InCStyleCasts?: boolean;
1333
+ InEmptyParentheses?: boolean;
1334
+ Other?: boolean;
1335
+ /**
1336
+ * Override any of the following options to prevent addition of space when both opening and closing parentheses use multiple parentheses.
1337
+ */
1338
+ ExceptDoubleParentheses?: boolean;
1339
+ [k: string]: unknown | undefined;
1340
+ };
1341
+ /**
1342
+ * clang-format 3.7
1343
+ *
1344
+ * If true, spaces will be inserted after ( and before ). This option is deprecated in clang-format 17. The previous behavior is preserved by using SpacesInParens with Custom and by setting all SpacesInParensOptions to true except for InCStyleCasts and InEmptyParentheses.
1345
+ */
1052
1346
  SpacesInParentheses?: boolean;
1053
1347
  /**
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
- */
1348
+ * clang-format 3.7
1349
+ *
1350
+ * If true, spaces will be inserted after [ and before ]. Lambdas without arguments or unspecified size array declarations will not be affected.
1351
+ */
1058
1352
  SpacesInSquareBrackets?: boolean;
1059
1353
  /**
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";
1354
+ * clang-format 3.7
1355
+ *
1356
+ * Parse and format C++ constructs compatible with this standard.
1357
+ */
1358
+ Standard?: 'Auto' | 'Latest' | 'c++03' | 'c++11' | 'c++14' | 'c++17' | 'c++20';
1065
1359
  /**
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
- */
1360
+ * clang-format 12
1361
+ *
1362
+ * 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.
1363
+ */
1070
1364
  StatementAttributeLikeMacros?: string[];
1071
1365
  /**
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
- */
1366
+ * clnag-format 8
1367
+ *
1368
+ * A vector of macros that should be interpreted as complete statements.
1369
+ *
1370
+ * 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.
1371
+ */
1078
1372
  StatementMacros?: string[];
1079
1373
  /**
1080
- * clang-format 3.7
1081
-
1082
- The number of columns used for tab stops.
1083
- */
1374
+ * clang-format 3.7
1375
+ *
1376
+ * The number of columns used for tab stops.
1377
+ */
1084
1378
  TabWidth?: number;
1085
1379
  /**
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
- */
1380
+ * clang-format 17
1381
+ *
1382
+ * A vector of non-keyword identifiers that should be interpreted as type names.
1383
+ *
1384
+ * A *, &, or && between a type name and another non-keyword identifier is annotated as a pointer or reference token instead of a binary operator.
1385
+ */
1386
+ TypeNames?: string[];
1387
+ /**
1388
+ * clang-format 9
1389
+ *
1390
+ * A vector of macros that should be interpreted as type declarations instead of as function calls.
1391
+ *
1392
+ * For example: OpenSSL STACK_OF, BSD LIST_ENTRY.
1393
+ */
1092
1394
  TypenameMacros?: string[];
1093
1395
  /**
1094
- * clang-format 10
1095
-
1096
- Use
1097
- * instead of
1098
- * for line breaks. Also used as fallback if DeriveLineEnding is true.
1099
- */
1396
+ * clang-format 10
1397
+ *
1398
+ * Use
1399
+ * instead of
1400
+ * for line breaks. Also used as fallback if DeriveLineEnding is true.
1401
+ *
1402
+ * This option is deprecated in clang-format 16. See LF and CRLF of LineEnding.
1403
+ */
1100
1404
  UseCRLF?: boolean;
1101
1405
  /**
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";
1406
+ * clang-format 3.7
1407
+ *
1408
+ * The way to use tab characters in the resulting file.
1409
+ */
1410
+ UseTab?: 'Never' | 'ForIndentation' | 'ForContinuationAndIndentation' | 'AlignWithSpaces' | 'Always';
1107
1411
  /**
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
- */
1412
+ * clang-format 17
1413
+ *
1414
+ * For Verilog, put each port on its own line in module instantiations.
1415
+ */
1416
+ VerilogBreakBetweenInstancePorts?: boolean;
1417
+ /**
1418
+ * clang-format 11
1419
+ *
1420
+ * A vector of macros which are whitespace-sensitive and should not be touched.
1421
+ *
1422
+ * For example: BOOST_PP_STRINGIZE
1423
+ */
1114
1424
  WhitespaceSensitiveMacros?: string[];
1425
+ /**
1426
+ * clang-format 19
1427
+ *
1428
+ * Style of aligning consecutive TableGen DAGArg operator colons. If enabled, align the colon inside DAGArg which have line break inside. This works only when TableGenBreakInsideDAGArg is BreakElements or BreakAll and the DAGArg is not excepted by TableGenBreakingDAGArgOperators’s effect.
1429
+ */
1430
+ AlignConsecutiveTableGenBreakingDAGArgColons?:
1431
+ | ('None' | 'Consecutive' | 'AcrossEmptyLines' | 'AcrossComments' | 'AcrossEmptyLinesAndComments')
1432
+ | {
1433
+ /**
1434
+ * Whether to align across comments.
1435
+ */
1436
+ AcrossComments?: boolean;
1437
+ /**
1438
+ * Whether to align across empty lines.
1439
+ */
1440
+ AcrossEmptyLines?: boolean;
1441
+ /**
1442
+ * Whether aligning is enabled.
1443
+ */
1444
+ Enabled?: boolean;
1445
+ [k: string]: unknown | undefined;
1446
+ };
1447
+ /**
1448
+ * clang-format 19
1449
+ *
1450
+ * Style of aligning consecutive TableGen cond operator colons. Align the colons of cases inside !cond operators.
1451
+ */
1452
+ AlignConsecutiveTableGenCondOperatorColons?:
1453
+ | ('None' | 'Consecutive' | 'AcrossEmptyLines' | 'AcrossComments' | 'AcrossEmptyLinesAndComments')
1454
+ | {
1455
+ /**
1456
+ * Whether to align across comments.
1457
+ */
1458
+ AcrossComments?: boolean;
1459
+ /**
1460
+ * Whether to align across empty lines.
1461
+ */
1462
+ AcrossEmptyLines?: boolean;
1463
+ /**
1464
+ * Whether aligning is enabled.
1465
+ */
1466
+ Enabled?: boolean;
1467
+ [k: string]: unknown | undefined;
1468
+ };
1469
+ /**
1470
+ * clang-format 19
1471
+ *
1472
+ * Style of aligning consecutive TableGen definition colons. This aligns the inheritance colons of consecutive definitions.
1473
+ */
1474
+ AlignConsecutiveTableGenDefinitionColons?:
1475
+ | ('None' | 'Consecutive' | 'AcrossEmptyLines' | 'AcrossComments' | 'AcrossEmptyLinesAndComments')
1476
+ | {
1477
+ /**
1478
+ * Whether to align across comments.
1479
+ */
1480
+ AcrossComments?: boolean;
1481
+ /**
1482
+ * Whether to align across empty lines.
1483
+ */
1484
+ AcrossEmptyLines?: boolean;
1485
+ /**
1486
+ * Whether aligning is enabled.
1487
+ */
1488
+ Enabled?: boolean;
1489
+ [k: string]: unknown | undefined;
1490
+ };
1491
+ /**
1492
+ * clang-format 19
1493
+ *
1494
+ * Whether to merge a short switch labeled rule into a single line.
1495
+ */
1496
+ AllowShortCaseExpressionOnASingleLine?: boolean;
1497
+ /**
1498
+ * clang-format 20
1499
+ *
1500
+ * If true, namespace a { class b; } can be put on a single line.
1501
+ */
1502
+ AllowShortNamespacesOnASingleLine?: boolean;
1503
+ /**
1504
+ * clang-format 21
1505
+ *
1506
+ * If BinPackLongBracedList is true it overrides BinPackArguments if there are 20 or more items in a braced initializer list.
1507
+ */
1508
+ BinPackLongBracedList?: boolean;
1509
+ /**
1510
+ * clang-format 19
1511
+ *
1512
+ * The function declaration return type breaking style to use.
1513
+ */
1514
+ BreakAfterReturnType?:
1515
+ | 'Automatic'
1516
+ | 'ExceptShortType'
1517
+ | 'None'
1518
+ | 'All'
1519
+ | 'TopLevel'
1520
+ | 'AllDefinitions'
1521
+ | 'TopLevelDefinitions';
1522
+ /**
1523
+ * clang-format 21
1524
+ *
1525
+ * If true, break before a template closing bracket (>) when there is a line break after the matching opening bracket (<).
1526
+ */
1527
+ BreakBeforeTemplateCloser?: boolean;
1528
+ /**
1529
+ * clang-format 20
1530
+ *
1531
+ * The break binary operations style to use.
1532
+ */
1533
+ BreakBinaryOperations?: 'Never' | 'OnePerLine' | 'RespectPrecedence';
1534
+ /**
1535
+ * clang-format 19
1536
+ *
1537
+ * If true, clang-format will always break before function definition parameters.
1538
+ */
1539
+ BreakFunctionDefinitionParameters?: boolean;
1540
+ /**
1541
+ * clang-format 19
1542
+ *
1543
+ * The template declaration breaking style to use.
1544
+ */
1545
+ BreakTemplateDeclarations?: 'Leave' | 'No' | 'MultiLine' | 'Yes';
1546
+ /**
1547
+ * clang-format 21
1548
+ *
1549
+ * Insert a comma (if missing) or remove the comma at the end of an enum enumerator list.
1550
+ *
1551
+ * Warning: Setting this option to any value other than Leave 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.
1552
+ */
1553
+ EnumTrailingComma?: 'Leave' | 'Insert' | 'Remove';
1554
+ /**
1555
+ * clang-format 20
1556
+ *
1557
+ * If true, clang-format will indent the body of an export { ... } block. This doesn’t affect the formatting of anything else related to exported declarations.
1558
+ */
1559
+ IndentExportBlock?: boolean;
1560
+ /**
1561
+ * clang-format 8
1562
+ *
1563
+ * A vector of prefixes ordered by the desired groups for Java imports.
1564
+ */
1565
+ JavaImportGroups?: string[];
1566
+ /**
1567
+ * clang-format 19
1568
+ *
1569
+ * Which empty lines are kept. See MaxEmptyLinesToKeep for how many consecutive empty lines are kept.
1570
+ */
1571
+ KeepEmptyLines?: {
1572
+ /**
1573
+ * Keep empty lines at end of file.
1574
+ */
1575
+ AtEndOfFile?: boolean;
1576
+ /**
1577
+ * Keep empty lines at start of a block.
1578
+ */
1579
+ AtStartOfBlock?: boolean;
1580
+ /**
1581
+ * Keep empty lines at start of file.
1582
+ */
1583
+ AtStartOfFile?: boolean;
1584
+ [k: string]: unknown | undefined;
1585
+ };
1586
+ /**
1587
+ * clang-format 20
1588
+ *
1589
+ * Keep the form feed character if it's immediately preceded and followed by a newline.
1590
+ */
1591
+ KeepFormFeed?: boolean;
1592
+ /**
1593
+ * clang-format 21
1594
+ *
1595
+ * A vector of function-like macros whose invocations should be skipped by RemoveParentheses.
1596
+ */
1597
+ MacrosSkippedByRemoveParentheses?: string[];
1598
+ /**
1599
+ * clang-format 19
1600
+ *
1601
+ * When guessing whether a #include is the "main" include, only the include directives that use the specified character are considered.
1602
+ */
1603
+ MainIncludeChar?: 'Quote' | 'AngleBracket' | 'Any';
1604
+ /**
1605
+ * clang-format 21
1606
+ *
1607
+ * A regular expression that describes markers for turning formatting off for one line.
1608
+ */
1609
+ OneLineFormatOffRegex?: string;
1610
+ /**
1611
+ * clang-format 20
1612
+ *
1613
+ * The penalty for breaking before a member access operator (., ->).
1614
+ */
1615
+ PenaltyBreakBeforeMemberAccess?: number;
1616
+ /**
1617
+ * clang-format 20
1618
+ *
1619
+ * Remove empty lines within unwrapped lines.
1620
+ */
1621
+ RemoveEmptyLinesInUnwrappedLines?: boolean;
1622
+ /**
1623
+ * clang-format 21
1624
+ *
1625
+ * If true, a space will be inserted after the operator keyword.
1626
+ */
1627
+ SpaceAfterOperatorKeyword?: boolean;
1628
+ /**
1629
+ * clang-format 19
1630
+ *
1631
+ * The styles of the line break inside the DAGArg in TableGen.
1632
+ */
1633
+ TableGenBreakInsideDAGArg?: 'DontBreak' | 'BreakElements' | 'BreakAll';
1634
+ /**
1635
+ * clang-format 19
1636
+ *
1637
+ * Works only when TableGenBreakInsideDAGArg is not DontBreak. If any identifier is specified, this limits the line breaks by TableGenBreakInsideDAGArg option only on DAGArg values beginning with the specified identifiers.
1638
+ */
1639
+ TableGenBreakingDAGArgOperators?: string[];
1640
+ /**
1641
+ * clang-format 20
1642
+ *
1643
+ * A vector of non-keyword identifiers that should be interpreted as template names.
1644
+ *
1645
+ * A < after a template name is annotated as a template opener instead of a binary operator.
1646
+ */
1647
+ TemplateNames?: string[];
1648
+ /**
1649
+ * clang-format 20
1650
+ *
1651
+ * A vector of non-keyword identifiers that should be interpreted as variable template names.
1652
+ *
1653
+ * A ) after a variable template instantiation is not annotated as the closing parenthesis of C-style cast operator.
1654
+ */
1655
+ VariableTemplates?: string[];
1656
+ /**
1657
+ * clang-format 20
1658
+ *
1659
+ * Wrap namespace body with empty lines.
1660
+ */
1661
+ WrapNamespaceBodyWithEmptyLines?: 'Never' | 'Always' | 'Leave';
1115
1662
  [k: string]: unknown | undefined;
1116
1663
  }