-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathswiftiomatic.json
More file actions
403 lines (403 loc) · 15.4 KB
/
Copy pathswiftiomatic.json
File metadata and controls
403 lines (403 loc) · 15.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
{
"$schema": "https://raw.githubusercontent.com/toba/swiftiomatic/refs/heads/main/schema.json",
"version": 7,
"sort": {
"sortImports": {
"lint": "no",
"rewrite": true,
"sortOrder": "length",
"shouldGroupImports": true,
"includeConditionalImports": false
},
"sortModifiers": { "lint": "warn", "rewrite": true },
"sortSwitchCases": { "lint": "no", "rewrite": false },
"sortTypeAliases": { "lint": "no", "rewrite": false },
"sortDeclarations": { "lint": "no", "rewrite": false },
"sortGetSetAccessors": {
"lint": "warn",
"order": "get_set"
}
},
"wrap": {
"nestedCallLayout": { "lint": "no", "mode": "inline", "rewrite": true },
"wrapCompoundCaseItems": { "lint": "no", "rewrite": false },
"collapseSimpleEnums": { "lint": "no", "rewrite": true },
"collapseSimpleIfElse": { "lint": "no", "rewrite": true },
"layoutSingleLineBodies": {
"lint": "no",
"mode": "inline",
"rewrite": true
},
"layoutSwitchCaseBodies": {
"lint": "no",
"mode": "adaptive",
"rewrite": true
},
"wrapSingleLineComments": { "lint": "no", "rewrite": false },
"wrapMultilineFunctionChains": { "lint": "no", "rewrite": false },
"keepReturnTypeWithSignature": true
},
"hoist": {
"hoistTry": { "lint": "no", "rewrite": true },
"hoistAwait": { "lint": "no", "rewrite": true },
"hoistCaseLet": {
"lint": "no",
"placement": "outerPattern",
"rewrite": true
},
"hoistIndirectEnum": { "lint": "no", "rewrite": true },
"hoistExtensionAccess": {
"lint": "no",
"rewrite": true,
"placement": "onExtension"
}
},
"types": {
"noOptionalBool": { "lint": "no" },
"noOptionalCollection": { "lint": "no" },
"useVoidNotEmptyTuple": { "lint": "warn", "rewrite": true },
"useFailableStringInit": { "lint": "warn" },
"useShorthandTypeNames": { "lint": "no", "rewrite": true },
"useAnyObjectOnDelegate": { "lint": "warn", "rewrite": true },
"useNonOptionalDataInit": { "lint": "warn" },
"dropTypeInStaticProperty": { "lint": "warn" },
"dropVoidReturnFromSignature": { "lint": "warn", "rewrite": true },
"noImplicitlyUnwrappedOptionals": { "lint": "warn" }
},
"access": {
"useFinalClasses": { "lint": "warn", "rewrite": false },
"makeStateVarsPrivate": { "lint": "no", "rewrite": true },
"useFilePrivateForFileLocal": {
"lint": "warn",
"rewrite": true,
"accessLevel": "private"
},
"matchExtensionAccessToMembers": { "lint": "warn", "rewrite": false }
},
"idioms": {
"useToggle": { "lint": "warn", "rewrite": true },
"useDotZero": { "lint": "warn", "rewrite": true },
"noVoidTernary": { "lint": "warn", "rewrite": false },
"noCaseNamedNone": { "lint": "no", "rewrite": false },
"useFileIDNotFile": { "lint": "no", "rewrite": false },
"useSelfNotTypeName": { "lint": "warn", "rewrite": true },
"noSwapThenRemoveAll": { "lint": "error" },
"noDropFirstInForLoop": { "lint": "no" },
"breakBeforeLeadingDot": { "lint": "no", "rewrite": true },
"useCompoundAssignment": { "lint": "warn", "rewrite": true },
"useStaticNotClassFunc": { "lint": "warn", "rewrite": false },
"useLazyForLongChainOps": { "lint": "warn" },
"useTypedThrowsNotResult": { "lint": "warn" },
"requireFatalErrorMessage": { "lint": "warn", "rewrite": false },
"useExplicitFalseInGuards": { "lint": "no", "rewrite": false },
"noAssignmentInExpressions": {
"lint": "warn",
"rewrite": true,
"allowedFunctions": ["XCTAssertNoThrow"]
},
"noRetroactiveConformances": { "lint": "warn" },
"useContinuousClockNotDate": { "lint": "warn" },
"noExplicitOwnershipModifiers": { "lint": "no", "rewrite": false },
"useOrderedSetForUniqueAppend": { "lint": "warn" },
"useAssertionFailureNotAssertFalse": { "lint": "warn", "rewrite": true }
},
"memory": {
"useStrongOutlets": { "lint": "warn", "rewrite": true },
"requireWeakDelegates": { "lint": "warn" },
"useWeakSelfInClosures": { "lint": "no" },
"requireAnyObjectOnDelegate": { "lint": "warn" },
"requireObserverRemovalInDeinit": { "lint": "warn" },
"requireRetainOfNotificationObserver": { "lint": "no" }
},
"naming": {
"capitalizeTypeNames": { "lint": "warn" },
"noLeadingUnderscores": { "lint": "warn" },
"requireASCIIIdentifiers": { "lint": "warn" },
"requireCamelCaseIdentifiers": { "lint": "warn" },
"uppercaseAcronymsInIdentifiers": {
"lint": "warn",
"rewrite": false,
"words": [
"ID",
"URL",
"UUID",
"HTTP",
"HTTPS",
"JSON",
"XML",
"HTML",
"API",
"TCP",
"UDP",
"DNS",
"SSH",
"FTP",
"SQL",
"CSS",
"RGB",
"RGBA",
"PDF",
"GIF",
"PNG",
"JPEG"
]
}
},
"spaces": {
"spaceAroundRangeOperators": false,
"spacesBeforeEndOfLineComments": 2
},
"metrics": {
"tupleSize": { "enabled": true, "error": 8, "warning": 6 },
"fileLength": {
"enabled": true,
"error": 2000,
"warning": 1000,
"ignoreCommentOnlyLines": true
},
"nestingDepth": { "lint": "warn", "typeLevel": 3, "functionLevel": 4 },
"parameterCount": {
"enabled": false,
"error": 8,
"warning": 5,
"ignoresDefaultParameters": true
},
"typeBodyLength": { "enabled": false, "error": 2000, "warning": 500 },
"lineLengthLimit": { "enabled": false, "error": 200, "warning": 120 },
"closureBodyLength": { "enabled": false, "error": 2000, "warning": 30 },
"functionBodyLength": { "enabled": false, "error": 500, "warning": 100 },
"associatedValueCount": { "enabled": true, "error": 6, "warning": 5 },
"cyclomaticComplexity": {
"enabled": false,
"error": 20,
"warning": 10,
"ignoresCaseStatements": false
}
},
"swiftui": {
"noFormatterInViewBody": { "lint": "warn" },
"flagForEachIDSelfInView": { "lint": "warn" },
"useAtEntryNotEnvironmentKey": { "lint": "no", "rewrite": false },
"dropRedundantMainActorOnView": { "lint": "warn", "rewrite": true },
"useClosureNotificationObserver": { "lint": "warn" }
},
"testing": {
"noGuardInTests": { "lint": "warn", "rewrite": false },
"useSwiftTestingNames": { "lint": "no", "rewrite": true },
"requireFinalOnXCTestCase": { "lint": "warn" },
"useSwiftTestingNotXCTest": { "lint": "warn", "rewrite": false },
"requireSuiteAccessControl": { "lint": "warn", "rewrite": false },
"requireTestFnPrefixOrAttribute": { "lint": "warn", "rewrite": false }
},
"closures": {
"useTrailingClosures": { "lint": "warn", "rewrite": true },
"noMutableInCaptureList": { "lint": "warn" },
"noMultiTrailingClosures": { "lint": "warn" },
"noParensInClosureParams": { "lint": "warn", "rewrite": true },
"noTrailingClosureParens": { "lint": "warn", "rewrite": true },
"flagUnhandledThrowingTask": { "lint": "no" },
"requireNamedClosureParams": { "lint": "no", "rewrite": false },
"flagAmbiguousTrailingClosure": { "lint": "warn" }
},
"comments": {
"fileHeader": { "lint": "no", "rewrite": false },
"reflowComments": { "lint": "no", "rewrite": true },
"noBlockComments": { "lint": "no" },
"flagExpiringTodo": {
"lint": "warn",
"dateFormat": "MM/dd/yyyy",
"dateSeparator": "/",
"expiredSeverity": "error",
"badFormattingSeverity": "warn",
"dateDelimitersClosing": "]",
"dateDelimitersOpening": "[",
"approachingExpirySeverity": "warn",
"approachingExpiryThreshold": 15
},
"useDocCommentsOnAPI": { "lint": "no", "rewrite": false },
"noOrphanedDocComment": { "lint": "warn" },
"formatSpecialComments": { "lint": "no", "rewrite": true },
"requireDocsOnPublicDecls": { "lint": "no" },
"useTripleSlashOverDocBlock": { "lint": "no", "rewrite": true },
"requireDocSummaryStructure": { "lint": "no" },
"requireParameterAndReturnDocs": { "lint": "no" },
"noDocCommentsInFunctionBodies": { "lint": "no" },
"placeDocCommentsBeforeModifiers": { "lint": "warn", "rewrite": true }
},
"generics": {
"simplifyGenericConstraints": { "lint": "warn", "rewrite": true },
"useSomeForGenericParameters": { "lint": "no", "rewrite": false },
"useAngleBracketsOnExtensions": { "lint": "warn", "rewrite": true }
},
"literals": {
"groupNumericLiterals": { "lint": "no", "rewrite": true },
"noPlaygroundLiterals": { "lint": "warn" },
"flagInvisibleCharacters": {
"lint": "error",
"additionalCodePoints": []
},
"noDuplicateDictionaryKeys": { "lint": "error" },
"useURLMacroForURLLiterals": { "lint": "no", "rewrite": false },
"flagEmptyCollectionLiteral": { "lint": "no", "rewrite": false },
"noLiteralProtocolDirectInit": { "lint": "warn" },
"useEmptyArrayLiteralForArgs": { "lint": "no" },
"reflowMultilineStringLiterals": "never",
"multilineTrailingCommaBehavior": "keptAsWritten",
"multiElementCollectionTrailingCommas": true
},
"unsafety": {
"noForceTry": { "lint": "warn", "rewrite": false },
"noForceCast": { "lint": "warn", "rewrite": false },
"noForceUnwrap": { "lint": "warn", "rewrite": false },
"noNestedWithLock": { "lint": "warn" },
"useTypedCatchError": { "lint": "warn" },
"noAwaitInsideWithLock": { "lint": "warn" },
"requireAsyncStreamFinish": { "lint": "warn" },
"flagMutationDuringIteration": { "lint": "warn" },
"flagRecursiveObservationTracking": { "lint": "warn" }
},
"blankLines": {
"maximumBlankLines": 1,
"treatCommentAsBlankLine": true,
"treatClosingBraceAsBlankLine": true,
"insertBlankLineAfterGuard": { "lint": "no", "rewrite": false },
"insertBlankLinesAroundMark": { "lint": "no", "rewrite": false },
"normalizeSwitchCaseSpacing": { "lint": "no", "rewrite": false },
"insertBlankLineAfterImports": { "lint": "no", "rewrite": true },
"insertBlankLineBetweenScopes": { "lint": "no", "rewrite": false },
"insertBlankLineAfterSwitchCase": { "lint": "no", "rewrite": false },
"insertBlankLineBeforeControlFlowBlocks": { "lint": "no", "rewrite": true }
},
"conditions": {
"useTernary": { "lint": "no", "rewrite": true },
"useEarlyExits": { "lint": "no", "rewrite": false },
"noYodaConditions": { "lint": "warn", "rewrite": true },
"useExplicitNilCheck": { "lint": "warn", "rewrite": true },
"noIdenticalOperands": { "lint": "error" },
"useIfElseAsExpression": { "lint": "no", "rewrite": false },
"noDuplicateConditions": { "lint": "error" },
"noParensAroundConditions": { "lint": "warn", "rewrite": true },
"useIfElseNotSwitchOnBool": { "lint": "warn", "rewrite": true },
"useCommaNotAndInConditions": { "lint": "warn", "rewrite": true },
"useUnavailableNotFatalError": { "lint": "warn", "rewrite": true }
},
"lineBreaks": {
"lineLength": 100,
"wrapTernaryBranches": { "lint": "warn", "rewrite": true },
"breakAtEndOfFile": { "lint": "no", "rewrite": false },
"breakBeforeEachArgument": false,
"keepModifiersOnSameLine": { "lint": "warn", "rewrite": false },
"placeElseCatchOnNewLine": false,
"respectExistingLineBreaks": true,
"breakBeforeGuardConditions": false,
"breakBeforeMultilineBrace": { "lint": "no", "rewrite": false },
"breakBetweenDeclAttributes": false,
"breakBeforeGenericRequirement": false,
"breakAroundMultilineChainParts": false,
"breakAfterAssignToConditional": { "lint": "no", "rewrite": false }
},
"collections": {
"useMinMax": { "lint": "warn" },
"useFlatMap": { "lint": "warn" },
"useIsEmpty": { "lint": "no", "rewrite": false },
"useKeyPath": { "lint": "no", "rewrite": false },
"useContains": { "lint": "warn" },
"useLastWhere": { "lint": "warn" },
"useAllSatisfy": { "lint": "warn" },
"useCountWhere": { "lint": "warn", "rewrite": true },
"useFirstWhere": { "lint": "warn" },
"useIsDisjoint": { "lint": "warn", "rewrite": false },
"useReduceInto": { "lint": "warn" }
},
"controlFlow": {
"useForLoopNotForEach": { "lint": "warn" },
"noSortFilterInForEach": { "lint": "warn" },
"useWhereClauseInForLoop": { "lint": "no", "rewrite": true }
},
"indentation": {
"unit": { "spaces": 4 },
"tabWidth": 8,
"indentBlankLines": false,
"indentSwitchCases": { "lint": "no", "rewrite": true, "style": "indented" },
"alignWrappedConditions": true,
"indentConditionalCompilationBlocks": false
},
"declarations": {
"requireSuperCall": {
"lint": "no",
"methodNames": [
"setUp()",
"tearDown()",
"invokeTest()",
"viewDidLoad()",
"awakeFromNib()",
"setUpWithError()",
"prepareForReuse()",
"viewDidAppear(_:)",
"invalidateLayout()",
"viewWillAppear(_:)",
"updateConstraints()",
"tearDownWithError()",
"viewDidDisappear(_:)",
"viewWillDisappear(_:)",
"invalidateLayout(with:)",
"setEditing(_:animated:)",
"didReceiveMemoryWarning()",
"prepareForInterfaceBuilder()",
"decodeRestorableState(with:)",
"encodeRestorableState(with:)"
]
},
"useSynthesizedInit": { "lint": "warn" },
"noUnusedSetterValue": { "lint": "error" },
"removeEmptyExtensions": { "lint": "warn", "rewrite": true },
"orderProtocolAccessors": { "lint": "warn", "rewrite": false },
"collapseSingleLineGetter": { "lint": "warn", "rewrite": true },
"markInitCoderUnavailable": { "lint": "no", "rewrite": false },
"useAtCNotUnderscoreCDecl": { "lint": "warn", "rewrite": true },
"convertStaticStructToEnum": { "lint": "warn", "rewrite": true },
"splitMultipleDeclsPerLine": { "lint": "warn", "rewrite": true },
"useWeakLetForUnreassigned": { "lint": "warn" },
"useMainAttributeNotMainFunc": { "lint": "warn", "rewrite": true },
"useAtSpecializeNotUnderscore": { "lint": "warn", "rewrite": true }
},
"redundancies": {
"dropSemicolons": { "lint": "no", "rewrite": true },
"useImplicitInit": { "lint": "warn", "rewrite": true },
"dropRedundantLet": { "lint": "warn", "rewrite": true },
"dropRedundantSelf": { "lint": "warn", "rewrite": true },
"dropBacktickedSelf": { "lint": "warn", "rewrite": true },
"dropRedundantAsync": { "lint": "no", "rewrite": false },
"dropRedundantBreak": { "lint": "warn", "rewrite": true },
"dropRedundantFinal": { "lint": "warn", "rewrite": false },
"dropRedundantReturn": { "lint": "no", "rewrite": true },
"dropRedundantThrows": { "lint": "no", "rewrite": false },
"dropUnusedArguments": { "lint": "no", "rewrite": true },
"dropRedundantNilInit": { "lint": "no", "rewrite": true },
"dropRedundantEscaping": { "lint": "warn", "rewrite": false },
"dropRedundantInitCall": { "lint": "warn", "rewrite": true },
"dropRedundantLetError": { "lint": "warn", "rewrite": true },
"dropRedundantOverride": { "lint": "warn", "rewrite": false },
"dropRedundantProperty": { "lint": "warn", "rewrite": true },
"dropRedundantSendable": { "lint": "no", "rewrite": false },
"dropRedundantBackticks": { "lint": "warn", "rewrite": true },
"dropRedundantEquatable": { "lint": "no", "rewrite": false },
"dropRedundantRawValues": { "lint": "warn", "rewrite": true },
"dropRedundantSetterACL": { "lint": "warn", "rewrite": false },
"dropRedundantEnumerated": { "lint": "warn", "rewrite": true },
"dropRedundantStaticSelf": { "lint": "no", "rewrite": false },
"dropFallthroughOnlyCases": { "lint": "warn", "rewrite": true },
"dropLabelsInCasePatterns": { "lint": "warn", "rewrite": true },
"dropRedundantCasePattern": { "lint": "warn", "rewrite": true },
"dropRedundantTypedThrows": { "lint": "warn", "rewrite": true },
"dropRedundantViewBuilder": { "lint": "no", "rewrite": false },
"dropRedundantAccessControl": { "lint": "no", "rewrite": false },
"dropRedundantNilCoalescing": { "lint": "warn", "rewrite": true },
"dropRedundantObjcAttribute": { "lint": "warn", "rewrite": true },
"dropUnusedControlFlowLabel": { "lint": "warn" },
"dropRedundantClosureWrapper": { "lint": "warn", "rewrite": true },
"dropRedundantTypeAnnotation": { "lint": "warn", "rewrite": true },
"dropRedundantOptionalBinding": { "lint": "warn", "rewrite": true },
"dropRedundantSwiftTestingSuite": { "lint": "no", "rewrite": false }
}
}