@@ -278,9 +278,11 @@ public struct Configuration: Codable, Equatable {
278
278
self . version = try container. decodeIfPresent ( Int . self, forKey: . version) ?? 1
279
279
guard version <= highestSupportedConfigurationVersion else {
280
280
throw DecodingError . dataCorruptedError (
281
- forKey: . version, in: container,
281
+ forKey: . version,
282
+ in: container,
282
283
debugDescription:
283
- " This version of the formatter does not support configuration version \( version) . " )
284
+ " This version of the formatter does not support configuration version \( version) . "
285
+ )
284
286
}
285
287
286
288
// If we ever introduce a new version, this is where we should switch on the decoded version
@@ -328,30 +330,40 @@ public struct Configuration: Codable, Equatable {
328
330
?? defaults. prioritizeKeepingFunctionOutputTogether
329
331
self . indentConditionalCompilationBlocks =
330
332
try container. decodeIfPresent ( Bool . self, forKey: . indentConditionalCompilationBlocks)
331
- ?? defaults. indentConditionalCompilationBlocks
333
+ ?? defaults. indentConditionalCompilationBlocks
332
334
self . lineBreakAroundMultilineExpressionChainComponents =
333
335
try container. decodeIfPresent (
334
- Bool . self, forKey: . lineBreakAroundMultilineExpressionChainComponents)
336
+ Bool . self,
337
+ forKey: . lineBreakAroundMultilineExpressionChainComponents
338
+ )
335
339
?? defaults. lineBreakAroundMultilineExpressionChainComponents
336
340
self . spacesAroundRangeFormationOperators =
337
341
try container. decodeIfPresent (
338
- Bool . self, forKey: . spacesAroundRangeFormationOperators)
342
+ Bool . self,
343
+ forKey: . spacesAroundRangeFormationOperators
344
+ )
339
345
?? defaults. spacesAroundRangeFormationOperators
340
346
self . fileScopedDeclarationPrivacy =
341
347
try container. decodeIfPresent (
342
- FileScopedDeclarationPrivacyConfiguration . self, forKey: . fileScopedDeclarationPrivacy)
348
+ FileScopedDeclarationPrivacyConfiguration . self,
349
+ forKey: . fileScopedDeclarationPrivacy
350
+ )
343
351
?? defaults. fileScopedDeclarationPrivacy
344
352
self . indentSwitchCaseLabels =
345
353
try container. decodeIfPresent ( Bool . self, forKey: . indentSwitchCaseLabels)
346
- ?? defaults. indentSwitchCaseLabels
354
+ ?? defaults. indentSwitchCaseLabels
347
355
self . noAssignmentInExpressions =
348
356
try container. decodeIfPresent (
349
- NoAssignmentInExpressionsConfiguration . self, forKey: . noAssignmentInExpressions)
357
+ NoAssignmentInExpressionsConfiguration . self,
358
+ forKey: . noAssignmentInExpressions
359
+ )
350
360
?? defaults. noAssignmentInExpressions
351
361
self . multiElementCollectionTrailingCommas =
352
362
try container. decodeIfPresent (
353
- Bool . self, forKey: . multiElementCollectionTrailingCommas)
354
- ?? defaults. multiElementCollectionTrailingCommas
363
+ Bool . self,
364
+ forKey: . multiElementCollectionTrailingCommas
365
+ )
366
+ ?? defaults. multiElementCollectionTrailingCommas
355
367
356
368
self . reflowMultilineStringLiterals =
357
369
try container. decodeIfPresent ( MultilineStringReflowBehavior . self, forKey: . reflowMultilineStringLiterals)
@@ -384,9 +396,12 @@ public struct Configuration: Codable, Equatable {
384
396
try container. encode ( lineBreakBetweenDeclarationAttributes, forKey: . lineBreakBetweenDeclarationAttributes)
385
397
try container. encode (
386
398
lineBreakAroundMultilineExpressionChainComponents,
387
- forKey: . lineBreakAroundMultilineExpressionChainComponents)
399
+ forKey: . lineBreakAroundMultilineExpressionChainComponents
400
+ )
388
401
try container. encode (
389
- spacesAroundRangeFormationOperators, forKey: . spacesAroundRangeFormationOperators)
402
+ spacesAroundRangeFormationOperators,
403
+ forKey: . spacesAroundRangeFormationOperators
404
+ )
390
405
try container. encode ( fileScopedDeclarationPrivacy, forKey: . fileScopedDeclarationPrivacy)
391
406
try container. encode ( indentSwitchCaseLabels, forKey: . indentSwitchCaseLabels)
392
407
try container. encode ( noAssignmentInExpressions, forKey: . noAssignmentInExpressions)
0 commit comments