@@ -93,7 +93,6 @@ class OptionDescriptor {
93
93
trueValues: [ String ] ,
94
94
falseValues: [ String ] )
95
95
{
96
- assert ( argumentName. count <= Options . maxArgumentNameLength)
97
96
assert ( argumentName == argumentName. lowercased ( ) )
98
97
self . argumentName = argumentName
99
98
self . displayName = displayName
@@ -968,7 +967,7 @@ struct _Descriptors {
968
967
keyPath: \. organizeEnumThreshold
969
968
)
970
969
let organizeExtensionThreshold = OptionDescriptor (
971
- argumentName: " extensionlength " ,
970
+ argumentName: " extensionthreshold " ,
972
971
displayName: " Organize Extension Threshold " ,
973
972
help: " Minimum line count to organize extension body. Defaults to 0 " ,
974
973
keyPath: \. organizeExtensionThreshold
@@ -1068,27 +1067,27 @@ struct _Descriptors {
1068
1067
keyPath: \. typeAttributes
1069
1068
)
1070
1069
let storedVarAttributes = OptionDescriptor (
1071
- argumentName: " storedvarattrs " ,
1070
+ argumentName: " storedvarattributes " ,
1072
1071
displayName: " Stored Property Attributes " ,
1073
- help: " Stored var @attribs : \" preserve \" , \" prev-line \" , or \" same-line \" " ,
1072
+ help: " Stored var @attributes : \" preserve \" , \" prev-line \" , or \" same-line \" " ,
1074
1073
keyPath: \. storedVarAttributes
1075
1074
)
1076
1075
let computedVarAttributes = OptionDescriptor (
1077
- argumentName: " computedvarattrs " ,
1076
+ argumentName: " computedvarattributes " ,
1078
1077
displayName: " Computed Property Attributes " ,
1079
- help: " Computed var @attribs : \" preserve \" , \" prev-line \" , \" same-line \" " ,
1078
+ help: " Computed var @attributes : \" preserve \" , \" prev-line \" , \" same-line \" " ,
1080
1079
keyPath: \. computedVarAttributes
1081
1080
)
1082
1081
let complexAttributes = OptionDescriptor (
1083
- argumentName: " complexattrs " ,
1082
+ argumentName: " complexattributes " ,
1084
1083
displayName: " Complex Attributes " ,
1085
1084
help: " Complex @attributes: \" preserve \" , \" prev-line \" , or \" same-line \" " ,
1086
1085
keyPath: \. complexAttributes
1087
1086
)
1088
1087
let complexAttributesExceptions = OptionDescriptor (
1089
- argumentName: " noncomplexattrs " ,
1088
+ argumentName: " noncomplexattributes " ,
1090
1089
displayName: " Complex Attribute exceptions " ,
1091
- help: " List of @attributes to exclude from complexattrs rule " ,
1090
+ help: " List of @attributes to exclude from --complexattributes options " ,
1092
1091
keyPath: \. complexAttributesExceptions
1093
1092
)
1094
1093
let yodaSwap = OptionDescriptor (
@@ -1166,7 +1165,7 @@ struct _Descriptors {
1166
1165
let genericTypes = OptionDescriptor (
1167
1166
argumentName: " generictypes " ,
1168
1167
displayName: " Additional generic types " ,
1169
- help: " Semicolon-delimited list of generic types and type parameters " ,
1168
+ help: " Semicolon-delimited list of generic types and type parameters. For example: \" LinkedList<Element>;StateStore<State, Action> \" " ,
1170
1169
keyPath: \. genericTypes,
1171
1170
fromArgument: { $0 } ,
1172
1171
toArgument: { $0 }
@@ -1182,31 +1181,31 @@ struct _Descriptors {
1182
1181
let preserveAnonymousForEach = OptionDescriptor (
1183
1182
argumentName: " anonymousforeach " ,
1184
1183
displayName: " Anonymous forEach closures " ,
1185
- help: " Convert anonymous forEach: \" convert \" (default) or \" ignore \" " ,
1184
+ help: " Convert anonymous forEach closures to for loops : \" convert \" (default) or \" ignore \" " ,
1186
1185
keyPath: \. preserveAnonymousForEach,
1187
1186
trueValues: [ " ignore " , " preserve " ] ,
1188
1187
falseValues: [ " convert " ]
1189
1188
)
1190
1189
let preserveSingleLineForEach = OptionDescriptor (
1191
- argumentName: " inlinedforeach " ,
1192
- displayName: " Inlined forEach closures" ,
1193
- help: " Convert inline forEach to for: \" convert \" , \" ignore \" (default) " ,
1190
+ argumentName: " singlelineforeach " ,
1191
+ displayName: " Single-line forEach closures" ,
1192
+ help: " Convert single-line forEach closures to for loop : \" convert \" , \" ignore \" (default) " ,
1194
1193
keyPath: \. preserveSingleLineForEach,
1195
1194
trueValues: [ " ignore " , " preserve " ] ,
1196
1195
falseValues: [ " convert " ]
1197
1196
)
1198
1197
let preserveDocComments = OptionDescriptor (
1199
1198
argumentName: " doccomments " ,
1200
1199
displayName: " Doc comments " ,
1201
- help: " Doc comments: \" before-declarations \" (default) or \" preserve \" " ,
1200
+ help: " Convert standard comments to doc comments: \" before-declarations \" (default) or \" preserve \" " ,
1202
1201
keyPath: \. preserveDocComments,
1203
1202
trueValues: [ " preserve " ] ,
1204
1203
falseValues: [ " before-declarations " , " declarations " ]
1205
1204
)
1206
1205
let conditionalAssignmentOnlyAfterNewProperties = OptionDescriptor (
1207
- argumentName: " condassignment " ,
1206
+ argumentName: " conditionalassignment " ,
1208
1207
displayName: " Apply conditionalAssignment rule " ,
1209
- help: " Use cond. assignment: \" after-property \" (default) or \" always \" " ,
1208
+ help: " Use if/switch expressions for conditional assignment: \" after-property \" (default) or \" always \" " ,
1210
1209
keyPath: \. conditionalAssignmentOnlyAfterNewProperties,
1211
1210
trueValues: [ " after-property " ] ,
1212
1211
falseValues: [ " always " ]
@@ -1247,11 +1246,11 @@ struct _Descriptors {
1247
1246
help: " Comma separated list of declaration names to exclude " ,
1248
1247
keyPath: \. preservedPrivateDeclarations
1249
1248
)
1250
- let preservedSymbols = OptionDescriptor (
1251
- argumentName: " preservedsymbols " ,
1252
- displayName: " Preserved Symbols " ,
1253
- help: " Comma-delimited list of symbols to be ignored by the rule " ,
1254
- keyPath: \. preservedSymbols
1249
+ let preservedPropertyTypes = OptionDescriptor (
1250
+ argumentName: " preservedpropertytypes " ,
1251
+ displayName: " Preserved Property Types " ,
1252
+ help: " Comma-delimited list of symbols to be ignored and preserved as-is by the propertyTypes rule " ,
1253
+ keyPath: \. preservedPropertyTypes
1255
1254
)
1256
1255
let additionalXCTestSymbols = OptionDescriptor (
1257
1256
argumentName: " xctestsymbols " ,
@@ -1260,9 +1259,9 @@ struct _Descriptors {
1260
1259
keyPath: \. additionalXCTestSymbols
1261
1260
)
1262
1261
let swiftUIPropertiesSortMode = OptionDescriptor (
1263
- argumentName: " sortswiftuiprops " ,
1262
+ argumentName: " sortswiftuiproperties " ,
1264
1263
displayName: " Sort SwiftUI Dynamic Properties " ,
1265
- help: " Sort SwiftUI props: none, alphabetize, first-appearance-sort " ,
1264
+ help: " Sort SwiftUI props: \" none \" , \" alphabetize \" , \" first-appearance-sort \" " ,
1266
1265
keyPath: \. swiftUIPropertiesSortMode
1267
1266
)
1268
1267
let equatableMacro = OptionDescriptor (
@@ -1280,7 +1279,7 @@ struct _Descriptors {
1280
1279
falseValues: [ " #fileID " , " fileID " ]
1281
1280
)
1282
1281
let lineBetweenConsecutiveGuards = OptionDescriptor (
1283
- argumentName: " linebtwnguards " ,
1282
+ argumentName: " linebetweenguards " ,
1284
1283
displayName: " Blank Line Between Consecutive Guards " ,
1285
1284
help: " Insert line between guards: \" true \" or \" false \" (default) " ,
1286
1285
keyPath: \. lineBetweenConsecutiveGuards,
@@ -1361,7 +1360,7 @@ struct _Descriptors {
1361
1360
argumentName: " varattributes " ,
1362
1361
displayName: " Var Attributes " ,
1363
1362
help: " Property @attributes: \" preserve \" , \" prev-line \" , or \" same-line \" " ,
1364
- deprecationMessage: " Use with `--storedvarattrs ` or `--computedvarattrs ` instead. " ,
1363
+ deprecationMessage: " Use with `--storedvarattributes ` or `--computedvarattributes ` instead. " ,
1365
1364
keyPath: \. varAttributes
1366
1365
)
1367
1366
@@ -1411,12 +1410,79 @@ struct _Descriptors {
1411
1410
keyPath: \. preserveSingleLineForEach,
1412
1411
trueValues: [ " ignore " , " preserve " ] ,
1413
1412
falseValues: [ " convert " ]
1414
- ) . renamed ( to: " inlinedforeach " )
1413
+ ) . renamed ( to: " singlelineforeach " )
1415
1414
1416
1415
let redundantType = OptionDescriptor (
1417
1416
argumentName: " redundanttype " ,
1418
1417
displayName: " Redundant Type " ,
1419
1418
help: " deprecated " ,
1420
1419
keyPath: \. propertyTypes
1421
1420
) . renamed ( to: " propertytypes " )
1421
+
1422
+ let inlinedForEach = OptionDescriptor (
1423
+ argumentName: " inlinedforeach " ,
1424
+ displayName: " Inlined forEach closures " ,
1425
+ help: " deprecated " ,
1426
+ keyPath: \. preserveSingleLineForEach,
1427
+ trueValues: [ " ignore " , " preserve " ] ,
1428
+ falseValues: [ " convert " ]
1429
+ ) . renamed ( to: " singlelineforeach " )
1430
+
1431
+ let condAssignment = OptionDescriptor (
1432
+ argumentName: " condassignment " ,
1433
+ displayName: " Apply conditionalAssignment rule " ,
1434
+ help: " deprecated " ,
1435
+ keyPath: \. conditionalAssignmentOnlyAfterNewProperties,
1436
+ trueValues: [ " after-property " ] ,
1437
+ falseValues: [ " always " ]
1438
+ ) . renamed ( to: " conditionalassignment " )
1439
+
1440
+ let storedVarAttrs = OptionDescriptor (
1441
+ argumentName: " storedvarattrs " ,
1442
+ displayName: " Stored Property Attributes " ,
1443
+ help: " deprecated " ,
1444
+ keyPath: \. storedVarAttributes
1445
+ ) . renamed ( to: " storedvarattributes " )
1446
+
1447
+ let computedVarAttrs = OptionDescriptor (
1448
+ argumentName: " computedvarattrs " ,
1449
+ displayName: " Computed Property Attributes " ,
1450
+ help: " deprecated " ,
1451
+ keyPath: \. computedVarAttributes
1452
+ ) . renamed ( to: " computedvarattributes " )
1453
+
1454
+ let complexAttrs = OptionDescriptor (
1455
+ argumentName: " complexattrs " ,
1456
+ displayName: " Complex Attributes " ,
1457
+ help: " deprecated " ,
1458
+ keyPath: \. complexAttributes
1459
+ ) . renamed ( to: " complexattributes " )
1460
+
1461
+ let complexAttrsExceptions = OptionDescriptor (
1462
+ argumentName: " noncomplexattrs " ,
1463
+ displayName: " Complex Attribute exceptions " ,
1464
+ help: " deprecated " ,
1465
+ keyPath: \. complexAttributesExceptions
1466
+ ) . renamed ( to: " noncomplexattributes " )
1467
+
1468
+ let preservedSymbols = OptionDescriptor (
1469
+ argumentName: " preservedsymbols " ,
1470
+ displayName: " Preserved Symbols " ,
1471
+ help: " deprecated " ,
1472
+ keyPath: \. preservedPropertyTypes
1473
+ ) . renamed ( to: " preservedpropertytypes " )
1474
+
1475
+ let swiftUIPropsSortMode = OptionDescriptor (
1476
+ argumentName: " sortswiftuiprops " ,
1477
+ displayName: " Sort SwiftUI Dynamic Properties " ,
1478
+ help: " deprecated " ,
1479
+ keyPath: \. swiftUIPropertiesSortMode
1480
+ ) . renamed ( to: " sortswiftuiproperties " )
1481
+
1482
+ let organizeExtensionLength = OptionDescriptor (
1483
+ argumentName: " extensionlength " ,
1484
+ displayName: " Organize Extension Threshold " ,
1485
+ help: " deprecated " ,
1486
+ keyPath: \. organizeExtensionThreshold
1487
+ ) . renamed ( to: " extensionthreshold " )
1422
1488
}
0 commit comments