@mmerterden/multi-agent-pipeline 20.7.0 → 20.8.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.
- package/CHANGELOG.md +9 -0
- package/LICENSE +0 -10
- package/docs/facts.json +1 -1
- package/manifest.json +266 -267
- package/package.json +2 -2
- package/pipeline/scripts/_notices.mjs +1 -1
- package/pipeline/skills/.skill-manifest.json +68 -68
- package/pipeline/skills/shared/README.md +70 -70
- package/pipeline/skills/shared/external/alarmkit/SKILL.md +373 -381
- package/pipeline/skills/shared/external/alarmkit/evals/evals.json +23 -18
- package/pipeline/skills/shared/external/alarmkit/references/alarmkit-patterns.md +328 -378
- package/pipeline/skills/shared/external/app-clips/SKILL.md +260 -160
- package/pipeline/skills/shared/external/app-clips/evals/evals.json +27 -27
- package/pipeline/skills/shared/external/app-clips/references/data-handoff-notifications-location.md +150 -83
- package/pipeline/skills/shared/external/app-clips/references/routing-and-experiences.md +135 -83
- package/pipeline/skills/shared/external/app-clips/references/size-capabilities-and-promotion.md +143 -85
- package/pipeline/skills/shared/external/app-intents/SKILL.md +302 -304
- package/pipeline/skills/shared/external/app-intents/evals/evals.json +21 -21
- package/pipeline/skills/shared/external/app-intents/references/appintents-advanced.md +594 -894
- package/pipeline/skills/shared/external/app-store-optimization/SKILL.md +339 -277
- package/pipeline/skills/shared/external/app-store-optimization/evals/evals.json +27 -23
- package/pipeline/skills/shared/external/app-store-optimization/references/keyword-research-methodology.md +105 -122
- package/pipeline/skills/shared/external/app-store-optimization/references/product-page-variants.md +143 -166
- package/pipeline/skills/shared/external/app-store-review/SKILL.md +307 -326
- package/pipeline/skills/shared/external/app-store-review/evals/evals.json +21 -21
- package/pipeline/skills/shared/external/app-store-review/references/privacy-manifest.md +105 -67
- package/pipeline/skills/shared/external/app-store-review/references/review-checklists.md +114 -101
- package/pipeline/skills/shared/external/apple-on-device-ai/SKILL.md +333 -360
- package/pipeline/skills/shared/external/apple-on-device-ai/evals/evals.json +24 -27
- package/pipeline/skills/shared/external/apple-on-device-ai/references/coreml-conversion.md +215 -322
- package/pipeline/skills/shared/external/apple-on-device-ai/references/coreml-optimization.md +161 -256
- package/pipeline/skills/shared/external/apple-on-device-ai/references/foundation-models.md +277 -387
- package/pipeline/skills/shared/external/apple-on-device-ai/references/mlx-swift.md +196 -210
- package/pipeline/skills/shared/external/authentication/SKILL.md +265 -381
- package/pipeline/skills/shared/external/authentication/evals/evals.json +25 -25
- package/pipeline/skills/shared/external/authentication/references/keychain-biometric.md +133 -178
- package/pipeline/skills/shared/external/authentication/references/passkeys.md +111 -147
- package/pipeline/skills/shared/external/avkit/SKILL.md +267 -364
- package/pipeline/skills/shared/external/avkit/evals/evals.json +26 -26
- package/pipeline/skills/shared/external/avkit/references/avkit-patterns.md +375 -493
- package/pipeline/skills/shared/external/background-processing/SKILL.md +270 -382
- package/pipeline/skills/shared/external/background-processing/evals/evals.json +22 -22
- package/pipeline/skills/shared/external/background-processing/references/background-task-patterns.md +169 -317
- package/pipeline/skills/shared/external/callkit-voip/SKILL.md +290 -371
- package/pipeline/skills/shared/external/callkit-voip/evals/evals.json +24 -24
- package/pipeline/skills/shared/external/callkit-voip/references/callkit-patterns.md +175 -343
- package/pipeline/skills/shared/external/cloudkit-sync/SKILL.md +292 -381
- package/pipeline/skills/shared/external/cloudkit-sync/evals/evals.json +33 -30
- package/pipeline/skills/shared/external/cloudkit-sync/references/cloudkit-patterns.md +227 -355
- package/pipeline/skills/shared/external/contacts-framework/SKILL.md +197 -346
- package/pipeline/skills/shared/external/contacts-framework/evals/evals.json +19 -21
- package/pipeline/skills/shared/external/contacts-framework/references/contacts-patterns.md +169 -308
- package/pipeline/skills/shared/external/core-bluetooth/SKILL.md +226 -376
- package/pipeline/skills/shared/external/core-bluetooth/evals/evals.json +25 -22
- package/pipeline/skills/shared/external/core-bluetooth/references/ble-patterns.md +257 -337
- package/pipeline/skills/shared/external/core-data/SKILL.md +292 -368
- package/pipeline/skills/shared/external/core-data/evals/evals.json +30 -27
- package/pipeline/skills/shared/external/core-motion/SKILL.md +235 -324
- package/pipeline/skills/shared/external/core-motion/evals/evals.json +31 -27
- package/pipeline/skills/shared/external/core-motion/references/motion-patterns.md +210 -310
- package/pipeline/skills/shared/external/core-nfc/SKILL.md +292 -366
- package/pipeline/skills/shared/external/core-nfc/evals/evals.json +22 -24
- package/pipeline/skills/shared/external/core-nfc/references/nfc-patterns.md +233 -329
- package/pipeline/skills/shared/external/coreml/SKILL.md +323 -367
- package/pipeline/skills/shared/external/coreml/evals/evals.json +24 -21
- package/pipeline/skills/shared/external/coreml/references/coreml-swift-integration.md +562 -565
- package/pipeline/skills/shared/external/cryptokit/SKILL.md +253 -394
- package/pipeline/skills/shared/external/cryptokit/evals/evals.json +20 -18
- package/pipeline/skills/shared/external/cryptokit/references/cryptokit-patterns.md +299 -488
- package/pipeline/skills/shared/external/debugging-instruments/SKILL.md +270 -323
- package/pipeline/skills/shared/external/debugging-instruments/evals/evals.json +27 -30
- package/pipeline/skills/shared/external/debugging-instruments/references/instruments-guide.md +167 -315
- package/pipeline/skills/shared/external/debugging-instruments/references/lldb-patterns.md +140 -193
- package/pipeline/skills/shared/external/device-integrity/SKILL.md +230 -353
- package/pipeline/skills/shared/external/device-integrity/evals/evals.json +25 -21
- package/pipeline/skills/shared/external/device-integrity/references/device-integrity-patterns.md +159 -197
- package/pipeline/skills/shared/external/energykit/SKILL.md +225 -392
- package/pipeline/skills/shared/external/energykit/evals/evals.json +29 -28
- package/pipeline/skills/shared/external/energykit/references/energykit-patterns.md +174 -470
- package/pipeline/skills/shared/external/eventkit-calendar/SKILL.md +261 -383
- package/pipeline/skills/shared/external/eventkit-calendar/evals/evals.json +25 -22
- package/pipeline/skills/shared/external/eventkit-calendar/references/eventkit-patterns.md +165 -268
- package/pipeline/skills/shared/external/healthkit/SKILL.md +252 -303
- package/pipeline/skills/shared/external/healthkit/evals/evals.json +24 -23
- package/pipeline/skills/shared/external/healthkit/references/healthkit-patterns.md +369 -523
- package/pipeline/skills/shared/external/homekit-matter/SKILL.md +233 -348
- package/pipeline/skills/shared/external/homekit-matter/evals/evals.json +27 -22
- package/pipeline/skills/shared/external/homekit-matter/references/matter-commissioning.md +199 -305
- package/pipeline/skills/shared/external/ios-accessibility/SKILL.md +368 -340
- package/pipeline/skills/shared/external/ios-accessibility/evals/evals.json +28 -27
- package/pipeline/skills/shared/external/ios-accessibility/references/a11y-patterns.md +314 -260
- package/pipeline/skills/shared/external/ios-accessibility/references/media-accessibility.md +97 -67
- package/pipeline/skills/shared/external/ios-accessibility/references/nutrition-labels.md +165 -101
- package/pipeline/skills/shared/external/ios-localization/SKILL.md +258 -371
- package/pipeline/skills/shared/external/ios-localization/evals/evals.json +23 -23
- package/pipeline/skills/shared/external/ios-localization/references/formatstyle-locale.md +283 -491
- package/pipeline/skills/shared/external/ios-localization/references/string-catalogs.md +313 -440
- package/pipeline/skills/shared/external/ios-networking/SKILL.md +265 -341
- package/pipeline/skills/shared/external/ios-networking/evals/evals.json +24 -24
- package/pipeline/skills/shared/external/ios-networking/references/background-websocket.md +425 -652
- package/pipeline/skills/shared/external/ios-networking/references/file-storage-patterns.md +143 -285
- package/pipeline/skills/shared/external/ios-networking/references/lightweight-clients.md +93 -53
- package/pipeline/skills/shared/external/ios-networking/references/network-framework.md +231 -456
- package/pipeline/skills/shared/external/ios-networking/references/urlsession-patterns.md +517 -784
- package/pipeline/skills/shared/external/ios-simulator/SKILL.md +265 -393
- package/pipeline/skills/shared/external/ios-simulator/evals/evals.json +21 -21
- package/pipeline/skills/shared/external/ios-simulator/references/simctl-commands.md +177 -270
- package/pipeline/skills/shared/external/live-activities/SKILL.md +318 -360
- package/pipeline/skills/shared/external/live-activities/evals/evals.json +21 -21
- package/pipeline/skills/shared/external/live-activities/references/activitykit-patterns.md +478 -710
- package/pipeline/skills/shared/external/mapkit-location/SKILL.md +295 -267
- package/pipeline/skills/shared/external/mapkit-location/evals/evals.json +28 -24
- package/pipeline/skills/shared/external/mapkit-location/references/mapkit-corelocation-patterns.md +378 -532
- package/pipeline/skills/shared/external/mapkit-location/references/mapkit-patterns.md +397 -499
- package/pipeline/skills/shared/external/metrickit-diagnostics/SKILL.md +165 -348
- package/pipeline/skills/shared/external/metrickit-diagnostics/evals/evals.json +26 -23
- package/pipeline/skills/shared/external/metrickit-diagnostics/references/metrickit-patterns.md +123 -130
- package/pipeline/skills/shared/external/musickit-audio/SKILL.md +189 -315
- package/pipeline/skills/shared/external/musickit-audio/evals/evals.json +22 -21
- package/pipeline/skills/shared/external/musickit-audio/references/musickit-patterns.md +181 -270
- package/pipeline/skills/shared/external/natural-language/SKILL.md +188 -340
- package/pipeline/skills/shared/external/natural-language/evals/evals.json +21 -21
- package/pipeline/skills/shared/external/natural-language/references/translation-patterns.md +171 -225
- package/pipeline/skills/shared/external/passkit-wallet/SKILL.md +258 -392
- package/pipeline/skills/shared/external/passkit-wallet/evals/evals.json +30 -29
- package/pipeline/skills/shared/external/passkit-wallet/references/wallet-passes.md +164 -231
- package/pipeline/skills/shared/external/pdfkit/SKILL.md +312 -344
- package/pipeline/skills/shared/external/pdfkit/evals/evals.json +19 -19
- package/pipeline/skills/shared/external/pdfkit/references/pdfkit-patterns.md +413 -624
- package/pipeline/skills/shared/external/pencilkit-drawing/SKILL.md +242 -358
- package/pipeline/skills/shared/external/pencilkit-drawing/evals/evals.json +25 -21
- package/pipeline/skills/shared/external/pencilkit-drawing/references/pencilkit-patterns.md +161 -226
- package/pipeline/skills/shared/external/permissionkit/SKILL.md +282 -400
- package/pipeline/skills/shared/external/permissionkit/evals/evals.json +27 -30
- package/pipeline/skills/shared/external/permissionkit/references/permissionkit-patterns.md +237 -350
- package/pipeline/skills/shared/external/photos-camera-media/SKILL.md +276 -325
- package/pipeline/skills/shared/external/photos-camera-media/references/av-playback.md +299 -545
- package/pipeline/skills/shared/external/photos-camera-media/references/camera-capture.md +344 -588
- package/pipeline/skills/shared/external/photos-camera-media/references/image-loading-caching.md +316 -660
- package/pipeline/skills/shared/external/photos-camera-media/references/photokit-patterns.md +270 -416
- package/pipeline/skills/shared/external/push-notifications/SKILL.md +312 -340
- package/pipeline/skills/shared/external/push-notifications/evals/evals.json +27 -26
- package/pipeline/skills/shared/external/push-notifications/references/notification-patterns.md +328 -485
- package/pipeline/skills/shared/external/push-notifications/references/rich-notifications.md +327 -560
- package/pipeline/skills/shared/external/realitykit-ar/SKILL.md +218 -410
- package/pipeline/skills/shared/external/realitykit-ar/evals/evals.json +24 -27
- package/pipeline/skills/shared/external/realitykit-ar/references/realitykit-patterns.md +221 -348
- package/pipeline/skills/shared/external/shareplay-activities/SKILL.md +222 -393
- package/pipeline/skills/shared/external/shareplay-activities/evals/evals.json +23 -24
- package/pipeline/skills/shared/external/shareplay-activities/references/shareplay-patterns.md +280 -420
- package/pipeline/skills/shared/external/speech-recognition/SKILL.md +217 -421
- package/pipeline/skills/shared/external/speech-recognition/evals/evals.json +23 -26
- package/pipeline/skills/shared/external/speech-recognition/references/speechanalyzer-patterns.md +133 -125
- package/pipeline/skills/shared/external/storekit/SKILL.md +228 -204
- package/pipeline/skills/shared/external/storekit/evals/evals.json +27 -24
- package/pipeline/skills/shared/external/storekit/references/app-review-guidelines.md +98 -109
- package/pipeline/skills/shared/external/storekit/references/core-patterns.md +298 -242
- package/pipeline/skills/shared/external/storekit/references/storekit-advanced.md +356 -649
- package/pipeline/skills/shared/external/swift-api-design-guidelines/SKILL.md +274 -399
- package/pipeline/skills/shared/external/swift-api-design-guidelines/evals/evals.json +22 -24
- package/pipeline/skills/shared/external/swift-api-design-guidelines/references/argument-labels-and-parameters.md +107 -108
- package/pipeline/skills/shared/external/swift-api-design-guidelines/references/conventions-and-special-rules.md +93 -165
- package/pipeline/skills/shared/external/swift-api-design-guidelines/references/naming-and-clarity.md +99 -137
- package/pipeline/skills/shared/external/swift-api-design-guidelines/references/side-effects-and-mutating-pairs.md +77 -120
- package/pipeline/skills/shared/external/swift-architecture/SKILL.md +334 -350
- package/pipeline/skills/shared/external/swift-architecture/evals/evals.json +22 -22
- package/pipeline/skills/shared/external/swift-charts/SKILL.md +208 -394
- package/pipeline/skills/shared/external/swift-charts/evals/evals.json +27 -30
- package/pipeline/skills/shared/external/swift-charts/references/charts-patterns.md +351 -762
- package/pipeline/skills/shared/external/swift-codable/SKILL.md +339 -343
- package/pipeline/skills/shared/external/swift-codable/evals/evals.json +20 -20
- package/pipeline/skills/shared/external/swift-concurrency/SKILL.md +303 -351
- package/pipeline/skills/shared/external/swift-concurrency/evals/evals.json +27 -24
- package/pipeline/skills/shared/external/swift-concurrency/references/approachable-concurrency.md +65 -80
- package/pipeline/skills/shared/external/swift-concurrency/references/async-algorithms.md +48 -84
- package/pipeline/skills/shared/external/swift-concurrency/references/bridging-interop.md +134 -79
- package/pipeline/skills/shared/external/swift-concurrency/references/concurrency-patterns.md +145 -167
- package/pipeline/skills/shared/external/swift-concurrency/references/diagnostics.md +62 -50
- package/pipeline/skills/shared/external/swift-concurrency/references/swiftui-concurrency.md +92 -121
- package/pipeline/skills/shared/external/swift-concurrency/references/synchronization-primitives.md +177 -241
- package/pipeline/skills/shared/external/swift-formatstyle/SKILL.md +258 -234
- package/pipeline/skills/shared/external/swift-language/SKILL.md +342 -382
- package/pipeline/skills/shared/external/swift-language/evals/evals.json +24 -27
- package/pipeline/skills/shared/external/swift-language/references/swift-attributes-interop.md +79 -56
- package/pipeline/skills/shared/external/swift-language/references/swift-patterns-extended.md +297 -340
- package/pipeline/skills/shared/external/swift-security/SKILL.md +180 -161
- package/pipeline/skills/shared/external/swift-security/evals/evals.json +25 -25
- package/pipeline/skills/shared/external/swift-security/references/biometric-authentication.md +314 -469
- package/pipeline/skills/shared/external/swift-security/references/certificate-trust.md +408 -476
- package/pipeline/skills/shared/external/swift-security/references/common-anti-patterns.md +260 -530
- package/pipeline/skills/shared/external/swift-security/references/compliance-owasp-mapping.md +270 -477
- package/pipeline/skills/shared/external/swift-security/references/credential-storage-patterns.md +573 -571
- package/pipeline/skills/shared/external/swift-security/references/cryptokit-public-key.md +370 -441
- package/pipeline/skills/shared/external/swift-security/references/cryptokit-symmetric.md +332 -433
- package/pipeline/skills/shared/external/swift-security/references/keychain-access-control.md +346 -468
- package/pipeline/skills/shared/external/swift-security/references/keychain-fundamentals.md +352 -472
- package/pipeline/skills/shared/external/swift-security/references/keychain-item-classes.md +431 -432
- package/pipeline/skills/shared/external/swift-security/references/keychain-sharing.md +328 -425
- package/pipeline/skills/shared/external/swift-security/references/migration-legacy-stores.md +341 -579
- package/pipeline/skills/shared/external/swift-security/references/secure-enclave.md +396 -457
- package/pipeline/skills/shared/external/swift-security/references/testing-security-code.md +354 -614
- package/pipeline/skills/shared/external/swift-testing/SKILL.md +188 -175
- package/pipeline/skills/shared/external/swift-testing/evals/evals.json +26 -24
- package/pipeline/skills/shared/external/swift-testing/references/testing-advanced.md +80 -84
- package/pipeline/skills/shared/external/swift-testing/references/testing-patterns.md +317 -433
- package/pipeline/skills/shared/external/swiftdata/SKILL.md +392 -256
- package/pipeline/skills/shared/external/swiftdata/evals/evals.json +24 -24
- package/pipeline/skills/shared/external/swiftdata/references/core-data-coexistence.md +206 -402
- package/pipeline/skills/shared/external/swiftdata/references/indexing.md +59 -52
- package/pipeline/skills/shared/external/swiftdata/references/predicate-pitfalls.md +57 -33
- package/pipeline/skills/shared/external/swiftdata/references/swiftdata-advanced.md +354 -747
- package/pipeline/skills/shared/external/swiftdata/references/swiftdata-queries.md +300 -508
- package/pipeline/skills/shared/external/swiftlint/SKILL.md +175 -226
- package/pipeline/skills/shared/external/swiftlint/references/adoption-and-configuration.md +141 -208
- package/pipeline/skills/shared/external/swiftlint/references/custom-rules-and-analyze.md +100 -109
- package/pipeline/skills/shared/external/swiftlint/references/plugins-run-scripts-and-integrations.md +159 -179
- package/pipeline/skills/shared/external/swiftlint/references/rule-reference.md +383 -18
- package/pipeline/skills/shared/external/swiftlint/references/rules-suppressions-and-baselines.md +143 -229
- package/pipeline/skills/shared/external/swiftui-animation/SKILL.md +283 -366
- package/pipeline/skills/shared/external/swiftui-animation/references/animation-advanced.md +396 -608
- package/pipeline/skills/shared/external/swiftui-animation/references/core-animation-bridge.md +336 -385
- package/pipeline/skills/shared/external/swiftui-gestures/SKILL.md +239 -349
- package/pipeline/skills/shared/external/swiftui-gestures/references/gesture-patterns.md +228 -310
- package/pipeline/skills/shared/external/swiftui-layout-components/SKILL.md +260 -249
- package/pipeline/skills/shared/external/swiftui-layout-components/references/form.md +92 -74
- package/pipeline/skills/shared/external/swiftui-layout-components/references/grids.md +112 -177
- package/pipeline/skills/shared/external/swiftui-layout-components/references/list.md +61 -64
- package/pipeline/skills/shared/external/swiftui-layout-components/references/scrollview.md +94 -134
- package/pipeline/skills/shared/external/swiftui-liquid-glass/SKILL.md +193 -225
- package/pipeline/skills/shared/external/swiftui-liquid-glass/references/liquid-glass.md +173 -327
- package/pipeline/skills/shared/external/swiftui-navigation/SKILL.md +193 -168
- package/pipeline/skills/shared/external/swiftui-navigation/references/deeplinks.md +127 -150
- package/pipeline/skills/shared/external/swiftui-navigation/references/navigationstack.md +132 -133
- package/pipeline/skills/shared/external/swiftui-navigation/references/sheets.md +152 -117
- package/pipeline/skills/shared/external/swiftui-navigation/references/tabview.md +106 -140
- package/pipeline/skills/shared/external/swiftui-patterns/SKILL.md +316 -252
- package/pipeline/skills/shared/external/swiftui-patterns/references/architecture-patterns.md +341 -332
- package/pipeline/skills/shared/external/swiftui-patterns/references/deprecated-migration.md +547 -854
- package/pipeline/skills/shared/external/swiftui-patterns/references/design-polish.md +485 -537
- package/pipeline/skills/shared/external/swiftui-patterns/references/platform-and-sharing.md +417 -499
- package/pipeline/skills/shared/external/swiftui-performance/SKILL.md +213 -376
- package/pipeline/skills/shared/external/swiftui-performance/references/demystify-swiftui-performance-wwdc23.md +86 -175
- package/pipeline/skills/shared/external/swiftui-performance/references/optimizing-swiftui-performance-instruments.md +89 -195
- package/pipeline/skills/shared/external/swiftui-performance/references/understanding-hangs-in-your-app.md +95 -182
- package/pipeline/skills/shared/external/swiftui-performance/references/understanding-improving-swiftui-performance.md +71 -149
- package/pipeline/skills/shared/external/swiftui-performance/references/wwdc-session-sources.md +21 -27
- package/pipeline/skills/shared/external/swiftui-uikit-interop/SKILL.md +303 -295
- package/pipeline/skills/shared/external/swiftui-uikit-interop/references/hosting-migration.md +204 -387
- package/pipeline/skills/shared/external/swiftui-uikit-interop/references/representable-recipes.md +469 -683
- package/pipeline/skills/shared/external/swiftui-webkit/SKILL.md +140 -186
- package/pipeline/skills/shared/external/swiftui-webkit/references/loading-and-observation.md +75 -86
- package/pipeline/skills/shared/external/swiftui-webkit/references/local-content-and-custom-schemes.md +63 -60
- package/pipeline/skills/shared/external/swiftui-webkit/references/migration-and-fallbacks.md +69 -137
- package/pipeline/skills/shared/external/swiftui-webkit/references/navigation-and-javascript.md +95 -67
- package/pipeline/skills/shared/external/tipkit/SKILL.md +220 -335
- package/pipeline/skills/shared/external/tipkit/references/tipkit-patterns.md +356 -494
- package/pipeline/skills/shared/external/vision-framework/SKILL.md +260 -375
- package/pipeline/skills/shared/external/vision-framework/references/vision-requests.md +393 -515
- package/pipeline/skills/shared/external/vision-framework/references/visionkit-scanner.md +363 -539
- package/pipeline/skills/shared/external/weatherkit/SKILL.md +152 -310
- package/pipeline/skills/shared/external/weatherkit/references/weatherkit-patterns.md +288 -407
- package/pipeline/skills/shared/external/widgetkit/SKILL.md +216 -288
- package/pipeline/skills/shared/external/widgetkit/references/widgetkit-advanced.md +414 -719
- package/pipeline/skills/shared/external/NOTICE-swift-ios-skills.md +0 -39
package/pipeline/skills/shared/external/swiftlint/references/rules-suppressions-and-baselines.md
CHANGED
|
@@ -1,283 +1,198 @@
|
|
|
1
|
-
# Rules, Suppressions
|
|
1
|
+
# Rules, Suppressions and Baselines
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Back to [SKILL.md](../SKILL.md). Every identifier is indexed in the
|
|
4
|
+
[rule reference](rule-reference.md).
|
|
4
5
|
|
|
5
|
-
##
|
|
6
|
+
## The three kinds of rule
|
|
6
7
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
- [Suppression Policy](#suppression-policy)
|
|
11
|
-
- [Baselines](#baselines)
|
|
12
|
-
- [False Positives](#false-positives)
|
|
13
|
-
- [Generated Code and Test Targets](#generated-code-and-test-targets)
|
|
8
|
+
**Default.** On out of the box because nearly every Swift codebase already
|
|
9
|
+
agrees with them, for example `force_cast`, `line_length` and
|
|
10
|
+
`trailing_semicolon`. Turn one off with `disabled_rules`.
|
|
14
11
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
## Rule Categories
|
|
18
|
-
|
|
19
|
-
SwiftLint rules fall into three categories:
|
|
20
|
-
|
|
21
|
-
### Default rules
|
|
22
|
-
|
|
23
|
-
Enabled automatically. These cover widely agreed-upon conventions (e.g., `line_length`, `force_cast`, `trailing_semicolon`). Disable specific ones via `disabled_rules` in `.swiftlint.yml`.
|
|
24
|
-
|
|
25
|
-
### Opt-in rules
|
|
26
|
-
|
|
27
|
-
Disabled by default because they are more opinionated or may not suit every project. Enable selectively via `opt_in_rules`:
|
|
12
|
+
**Opt-in.** Off out of the box because they take a stronger position. A fuller
|
|
13
|
+
opt-in list than the starter config:
|
|
28
14
|
|
|
29
15
|
```yaml
|
|
30
16
|
opt_in_rules:
|
|
31
|
-
-
|
|
17
|
+
- accessibility_label_for_image
|
|
18
|
+
- accessibility_trait_for_button
|
|
32
19
|
- closure_spacing
|
|
33
|
-
-
|
|
34
|
-
- sorted_imports
|
|
35
|
-
- contains_over_filter_count
|
|
36
|
-
- first_where
|
|
37
|
-
- last_where
|
|
38
|
-
- modifier_order
|
|
39
|
-
- vertical_whitespace_opening_braces
|
|
20
|
+
- empty_count
|
|
40
21
|
- explicit_init
|
|
22
|
+
- force_unwrapping
|
|
41
23
|
- joined_default_parameter
|
|
42
|
-
- redundant_nil_coalescing
|
|
43
24
|
- private_swiftui_state
|
|
25
|
+
- redundant_nil_coalescing
|
|
26
|
+
- sorted_imports
|
|
44
27
|
- unhandled_throwing_task
|
|
45
|
-
-
|
|
46
|
-
- accessibility_trait_for_button
|
|
28
|
+
- vertical_whitespace_opening_braces
|
|
47
29
|
```
|
|
48
30
|
|
|
49
|
-
|
|
31
|
+
**Analyzer.** Need type information from the compiler, so they only run under
|
|
32
|
+
`swiftlint analyze` fed with compiler logs. See
|
|
33
|
+
[custom rules and analyze](custom-rules-and-analyze.md).
|
|
50
34
|
|
|
51
|
-
|
|
35
|
+
## Looking rules up
|
|
52
36
|
|
|
53
|
-
```
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
37
|
+
```bash
|
|
38
|
+
swiftlint rules # all rules, with enabled / disabled / correctable columns
|
|
39
|
+
swiftlint rules --enabled # just the enabled ones
|
|
40
|
+
swiftlint rules --disabled # just the disabled ones
|
|
41
|
+
swiftlint rules force_unwrapping # one rule in detail
|
|
57
42
|
```
|
|
58
43
|
|
|
59
|
-
##
|
|
44
|
+
## Rules you will meet early
|
|
45
|
+
|
|
46
|
+
### Default rules with options
|
|
47
|
+
|
|
48
|
+
| Rule | Checks | Options |
|
|
49
|
+
|---|---|---|
|
|
50
|
+
| `line_length` | characters per line | `warning`, `error`, `ignores_urls`, `ignores_comments`, `ignores_interpolated_strings` |
|
|
51
|
+
| `file_length` | lines per file | `warning`, `error`, `ignore_comment_only_lines` |
|
|
52
|
+
| `type_body_length` | lines inside a type body | `warning`, `error` |
|
|
53
|
+
| `function_body_length` | lines inside a function body | `warning`, `error` |
|
|
54
|
+
| `function_parameter_count` | number of parameters | `warning`, `error`, `ignores_default_parameters` |
|
|
55
|
+
| `cyclomatic_complexity` | branching complexity | `warning`, `error`, `ignores_case_statements` |
|
|
56
|
+
| `nesting` | how deep types and functions nest | `type_level`, `function_level` |
|
|
57
|
+
| `blanket_disable_command` | a `swiftlint:disable` that silences the rest of the file | `allowed_rules`, `always_blanket_disable` |
|
|
58
|
+
| `identifier_name` | identifier length and casing | `min_length`, `max_length`, `excluded` (short names such as `id`, `x`, `i`) |
|
|
59
|
+
| `type_name` | type name length and casing | `min_length`, `max_length`, `excluded` |
|
|
60
|
+
| `large_tuple` | tuple arity | `warning`, `error` |
|
|
61
|
+
| `force_cast` | `as!` | severity only |
|
|
62
|
+
| `force_try` | `try!` | severity only |
|
|
63
|
+
| `todo` | `// TODO:` and `// FIXME:` | severity only |
|
|
64
|
+
| `trailing_whitespace` | spaces at line end | `ignores_empty_lines`, `ignores_comments` |
|
|
65
|
+
| `trailing_comma` | commas after the last element | `mandatory_comma` (`true` demands them) |
|
|
66
|
+
| `vertical_whitespace` | runs of blank lines | `max_empty_lines` |
|
|
67
|
+
| `opening_brace` | `{` kept on the declaration line | `allow_multiline_func` |
|
|
68
|
+
| `colon` | spacing around colons | `flexible_right_spacing`, `apply_to_dictionaries` |
|
|
69
|
+
| `deployment_target` | `@available` / `#available` checks the deployment target already guarantees | `iOS_deployment_target`, `macOS_deployment_target`, and siblings |
|
|
70
|
+
|
|
71
|
+
### Opt-in rules worth considering
|
|
72
|
+
|
|
73
|
+
| Rule | Why turn it on |
|
|
74
|
+
|---|---|
|
|
75
|
+
| `force_unwrapping` | Every `!` is a potential crash. Relax it for tests in a child config. |
|
|
76
|
+
| `private_swiftui_state` | `@State`, `@StateObject` and `@FocusState` must be `private`, so nothing outside the view can mutate its state. |
|
|
77
|
+
| `unhandled_throwing_task` | `Task { try ... }` with no `do/catch` drops its error on the floor. |
|
|
78
|
+
| `sorted_imports` | Alphabetical imports mean fewer merge conflicts. Correctable. |
|
|
79
|
+
| `modifier_order` | Declaration modifiers always in the same order. Correctable. |
|
|
80
|
+
| `accessibility_label_for_image` | Images must carry an accessibility label. |
|
|
81
|
+
| `accessibility_trait_for_button` | Tappable elements must carry a button trait. |
|
|
82
|
+
| `empty_count` | `.isEmpty` rather than `.count == 0`. |
|
|
83
|
+
| `closure_spacing` | Spaces just inside closure braces. |
|
|
84
|
+
| `contains_over_filter_count` | `.contains` rather than `.filter { }.count`. |
|
|
85
|
+
| `first_where` / `last_where` | `.first(where:)` rather than `.filter { }.first`. |
|
|
86
|
+
| `redundant_nil_coalescing` | Catches `value ?? nil`. |
|
|
87
|
+
| `implicit_return` | Single-expression bodies drop the `return`. |
|
|
88
|
+
| `self_binding` | One consistent name when rebinding `self` (`guard let self`); option `bind_identifier`. |
|
|
89
|
+
| `shorthand_optional_binding` | `if let name` over `if let name = name` (Swift 5.7 and later). |
|
|
90
|
+
| `expiring_todo` | TODO/FIXME comments carrying a date escalate to warnings, then errors, once overdue; thresholds and severities configurable. |
|
|
60
91
|
|
|
61
|
-
|
|
92
|
+
### Analyzer rules
|
|
62
93
|
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
94
|
+
| Rule | Finds |
|
|
95
|
+
|---|---|
|
|
96
|
+
| `unused_import` | imports nothing in the file needs; correctable |
|
|
97
|
+
| `unused_declaration` | private declarations that nothing references |
|
|
98
|
+
| `capture_variable` | mutable variables captured by a closure |
|
|
99
|
+
| `explicit_self` | instance member access without `self.` |
|
|
100
|
+
| `typesafe_array_init` | `Array(items.map { ... })` where the `map` result is already an array |
|
|
69
101
|
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
## Commonly Encountered Rules Quick Reference
|
|
75
|
-
|
|
76
|
-
An agent writing or reviewing Swift code should understand what these frequently triggered rules enforce. Each rule can be configured in `.swiftlint.yml` using the rule identifier as a key.
|
|
77
|
-
|
|
78
|
-
### Default rules (enabled automatically)
|
|
79
|
-
|
|
80
|
-
| Rule | What it enforces | Key config options |
|
|
81
|
-
| ------ | ------------------ | -------------------- |
|
|
82
|
-
| `line_length` | Max characters per line | `warning`, `error`, `ignores_urls`, `ignores_comments`, `ignores_interpolated_strings` |
|
|
83
|
-
| `file_length` | Max lines per file | `warning`, `error`, `ignore_comment_only_lines` |
|
|
84
|
-
| `type_body_length` | Max lines in a type body | `warning`, `error` |
|
|
85
|
-
| `function_body_length` | Max lines in a function body | `warning`, `error` |
|
|
86
|
-
| `function_parameter_count` | Max parameters per function | `warning`, `error`, `ignores_default_parameters` |
|
|
87
|
-
| `cyclomatic_complexity` | Max branching complexity | `warning`, `error`, `ignores_case_statements` |
|
|
88
|
-
| `nesting` | Max nesting depth | `type_level`, `function_level` |
|
|
89
|
-
| `blanket_disable_command` | Prevents `swiftlint:disable` from disabling rules for the rest of the file | `allowed_rules`, `always_blanket_disable` |
|
|
90
|
-
| `identifier_name` | Naming length and conventions | `min_length`, `max_length`, `excluded` (list of allowed short names like `id`, `x`, `i`) |
|
|
91
|
-
| `type_name` | Type naming length and conventions | `min_length`, `max_length`, `excluded` |
|
|
92
|
-
| `large_tuple` | Max tuple size | `warning`, `error` |
|
|
93
|
-
| `force_cast` | Flags `as!` | severity only |
|
|
94
|
-
| `force_try` | Flags `try!` | severity only |
|
|
95
|
-
| `todo` | Flags `// TODO:` and `// FIXME:` | severity only |
|
|
96
|
-
| `trailing_whitespace` | Trailing spaces on lines | `ignores_empty_lines`, `ignores_comments` |
|
|
97
|
-
| `trailing_comma` | Trailing commas in collections | `mandatory_comma` (when `true`, *requires* trailing commas) |
|
|
98
|
-
| `vertical_whitespace` | Max consecutive blank lines | `max_empty_lines` |
|
|
99
|
-
| `opening_brace` | Brace placement (`{` on same line) | `allow_multiline_func` |
|
|
100
|
-
| `colon` | Spacing around colons | `flexible_right_spacing`, `apply_to_dictionaries` |
|
|
101
|
-
| `deployment_target` | Flags `@available` / `#available` checks that use versions already satisfied by the deployment target | `iOS_deployment_target`, `macOS_deployment_target`, etc. |
|
|
102
|
-
|
|
103
|
-
### High-value opt-in rules
|
|
104
|
-
|
|
105
|
-
| Rule | What it enforces | Why enable it |
|
|
106
|
-
| ------ | ------------------ | --------------- |
|
|
107
|
-
| `force_unwrapping` | Flags `!` unwraps | Catches crashes; relax in tests via child config |
|
|
108
|
-
| `private_swiftui_state` | `@State`, `@StateObject`, `@FocusState` must be `private` | Prevents accidental external mutation of view state |
|
|
109
|
-
| `unhandled_throwing_task` | `Task { try ... }` without `do/catch` | Silently swallowed errors in async contexts |
|
|
110
|
-
| `sorted_imports` | Import statements in alphabetical order | Reduces merge conflicts; auto-correctable |
|
|
111
|
-
| `modifier_order` | Consistent declaration modifier ordering | Readability; auto-correctable |
|
|
112
|
-
| `accessibility_label_for_image` | Images must have accessibility labels | Accessibility compliance |
|
|
113
|
-
| `accessibility_trait_for_button` | Buttons must have accessibility traits | Accessibility compliance |
|
|
114
|
-
| `empty_count` | Use `.isEmpty` instead of `.count == 0` | Performance and clarity |
|
|
115
|
-
| `closure_spacing` | Spaces inside closure braces | Formatting consistency |
|
|
116
|
-
| `contains_over_filter_count` | `.contains` instead of `.filter { }.count` | Performance |
|
|
117
|
-
| `first_where` / `last_where` | `.first(where:)` instead of `.filter { }.first` | Performance |
|
|
118
|
-
| `redundant_nil_coalescing` | Flags `x ?? nil` | Dead code |
|
|
119
|
-
| `implicit_return` | Single-expression returns don't need `return` | Modern Swift style |
|
|
120
|
-
| `self_binding` | Consistent `guard let self` naming | Configurable: `bind_identifier` |
|
|
121
|
-
| `shorthand_optional_binding` | `if let x` instead of `if let x = x` | Swift 5.7+ style |
|
|
122
|
-
| `expiring_todo` | TODOs/FIXMEs with dates become warnings or errors after expiry | Project hygiene with configurable thresholds and severities |
|
|
123
|
-
|
|
124
|
-
### Analyzer rules (require compiler logs)
|
|
125
|
-
|
|
126
|
-
| Rule | What it enforces |
|
|
127
|
-
| ------ | ------------------ |
|
|
128
|
-
| `unused_import` | Flags unnecessary `import` statements; auto-correctable |
|
|
129
|
-
| `unused_declaration` | Flags private declarations never referenced |
|
|
130
|
-
| `capture_variable` | Flags mutable variables captured by closures |
|
|
131
|
-
| `explicit_self` | Requires `self.` for instance members |
|
|
132
|
-
| `typesafe_array_init` | Flags `Array(x.map { ... })` → use `x.map { ... }` directly |
|
|
133
|
-
|
|
134
|
-
### Per-rule configuration pattern
|
|
135
|
-
|
|
136
|
-
Every rule that accepts configuration uses its identifier as the YAML key:
|
|
102
|
+
## Configuring one rule
|
|
103
|
+
|
|
104
|
+
Each configurable rule takes its identifier as a YAML key:
|
|
137
105
|
|
|
138
106
|
```yaml
|
|
139
|
-
#
|
|
140
|
-
line_length:
|
|
107
|
+
line_length: # thresholds
|
|
141
108
|
warning: 140
|
|
142
109
|
error: 200
|
|
143
110
|
|
|
144
|
-
#
|
|
145
|
-
trailing_comma:
|
|
111
|
+
trailing_comma: # boolean option
|
|
146
112
|
mandatory_comma: true
|
|
147
113
|
|
|
148
|
-
#
|
|
149
|
-
|
|
150
|
-
excluded:
|
|
151
|
-
- id
|
|
152
|
-
- x
|
|
153
|
-
- y
|
|
114
|
+
identifier_name: # identifiers exempt from the rule
|
|
115
|
+
excluded: [id, x, y]
|
|
154
116
|
|
|
155
|
-
#
|
|
156
|
-
force_cast: error # shorthand for severity: error
|
|
117
|
+
force_cast: error # shorthand for severity: error
|
|
157
118
|
|
|
158
|
-
#
|
|
159
|
-
deployment_target:
|
|
119
|
+
deployment_target: # minimum versions already guaranteed
|
|
160
120
|
iOS_deployment_target: "16.0"
|
|
161
121
|
```
|
|
162
122
|
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
## Suppression Syntax
|
|
166
|
-
|
|
167
|
-
### Single-line suppressions
|
|
123
|
+
## Suppression syntax
|
|
168
124
|
|
|
169
125
|
```swift
|
|
170
|
-
// swiftlint:disable:next
|
|
171
|
-
let
|
|
126
|
+
// swiftlint:disable:next force_unwrapping
|
|
127
|
+
let icon = iconsByKind[kind]! // next line
|
|
172
128
|
|
|
173
|
-
let
|
|
129
|
+
let port = Int(raw)! // swiftlint:disable:this force_unwrapping // same line
|
|
174
130
|
|
|
175
|
-
|
|
131
|
+
let host = hosts[0]!
|
|
132
|
+
// swiftlint:disable:previous force_unwrapping // previous line
|
|
176
133
|
```
|
|
177
134
|
|
|
178
|
-
|
|
179
|
-
- `:this` - suppresses on the same line
|
|
180
|
-
- `:previous` - suppresses on the previous line
|
|
181
|
-
|
|
182
|
-
### Region suppressions
|
|
135
|
+
A region can name several rules separated by spaces:
|
|
183
136
|
|
|
184
137
|
```swift
|
|
185
138
|
// swiftlint:disable cyclomatic_complexity function_body_length
|
|
186
|
-
func
|
|
187
|
-
//
|
|
139
|
+
func migrate(_ record: LegacyRecord) {
|
|
140
|
+
// many branches
|
|
188
141
|
}
|
|
189
142
|
// swiftlint:enable cyclomatic_complexity function_body_length
|
|
190
143
|
```
|
|
191
144
|
|
|
192
|
-
|
|
145
|
+
Leaving out `// swiftlint:enable all` after `// swiftlint:disable all` switches
|
|
146
|
+
the linter off for the remainder of the file.
|
|
193
147
|
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
```swift
|
|
197
|
-
// swiftlint:disable all
|
|
198
|
-
// ... entire block is unlinted ...
|
|
199
|
-
// swiftlint:enable all
|
|
200
|
-
```
|
|
148
|
+
## Suppression policy
|
|
201
149
|
|
|
202
|
-
|
|
150
|
+
- `disable all` is reserved for generated code that the config genuinely
|
|
151
|
+
cannot exclude.
|
|
152
|
+
- Put a short justification after the directive:
|
|
203
153
|
|
|
204
|
-
|
|
154
|
+
```swift
|
|
155
|
+
// swiftlint:disable:next force_cast - storyboard guarantees this cell class
|
|
156
|
+
let cell = collection.dequeueReusableCell(withReuseIdentifier: "Tile", for: path) as! TileCell
|
|
157
|
+
```
|
|
205
158
|
|
|
206
|
-
-
|
|
207
|
-
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
// swiftlint:disable:next force_cast - guaranteed by Interface Builder outlet type
|
|
211
|
-
let cell = tableView.dequeueReusableCell(...) as! CustomCell
|
|
212
|
-
```
|
|
213
|
-
|
|
214
|
-
- **Re-enable after regions.** Always pair `disable` with `enable`.
|
|
215
|
-
- **Prefer config-level exclusion** for entire files or directories of generated code.
|
|
216
|
-
- **Review suppressions in code review.** Inline suppressions should be as scrutinized as the code they protect.
|
|
217
|
-
- **Treat suppressions as tech debt.** Track and reduce them over time.
|
|
159
|
+
- Every `disable` has an `enable`.
|
|
160
|
+
- Whole generated files or folders go in `excluded`, not behind comments.
|
|
161
|
+
- Review suppressions as carefully as the code around them.
|
|
162
|
+
- Count them as technical debt; track them and bring the number down.
|
|
218
163
|
|
|
219
164
|
## Baselines
|
|
220
165
|
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
This creates a JSON file listing every current violation by file, line, and rule. Commit this file to the repository.
|
|
230
|
-
|
|
231
|
-
### Using a baseline
|
|
232
|
-
|
|
233
|
-
```sh
|
|
234
|
-
swiftlint --baseline .swiftlint.baseline
|
|
235
|
-
```
|
|
236
|
-
|
|
237
|
-
Violations matching the baseline are suppressed. New violations (new files, new lines, new rules) are reported normally.
|
|
238
|
-
|
|
239
|
-
### Updating a baseline
|
|
240
|
-
|
|
241
|
-
After fixing violations, regenerate:
|
|
242
|
-
|
|
243
|
-
```sh
|
|
244
|
-
swiftlint --write-baseline .swiftlint.baseline
|
|
245
|
-
```
|
|
246
|
-
|
|
247
|
-
The new baseline will be smaller. Commit the update.
|
|
248
|
-
|
|
249
|
-
### Baseline in CI
|
|
250
|
-
|
|
251
|
-
```sh
|
|
252
|
-
swiftlint --strict --baseline .swiftlint.baseline --reporter github-actions-logging
|
|
253
|
-
```
|
|
254
|
-
|
|
255
|
-
This fails the build only on new violations not present in the baseline.
|
|
256
|
-
|
|
257
|
-
### Baseline vs suppressions
|
|
258
|
-
|
|
259
|
-
| Approach | When to use |
|
|
260
|
-
| -------- | ----------- |
|
|
261
|
-
| Baseline | Adopting SwiftLint in a large existing codebase |
|
|
262
|
-
| Inline suppression | Specific intentional deviation from a rule |
|
|
263
|
-
| `disabled_rules` | Team disagrees with a rule project-wide |
|
|
264
|
-
| `excluded` paths | Generated or vendored code |
|
|
265
|
-
| Child config | Different rules for test vs production code |
|
|
166
|
+
- `swiftlint --write-baseline .swiftlint.baseline` writes a JSON file listing
|
|
167
|
+
every current violation with its file, line and rule. Commit it.
|
|
168
|
+
- `swiftlint --baseline .swiftlint.baseline` hides violations that match an
|
|
169
|
+
entry. New files, new lines and newly triggered rules still report.
|
|
170
|
+
- After fixing some violations, run `--write-baseline` again and commit the
|
|
171
|
+
smaller file.
|
|
172
|
+
- CI that only fails on new violations:
|
|
173
|
+
`swiftlint --strict --baseline .swiftlint.baseline --reporter github-actions-logging`
|
|
266
174
|
|
|
267
|
-
|
|
175
|
+
### Choosing a tool
|
|
268
176
|
|
|
269
|
-
|
|
177
|
+
| Situation | Reach for |
|
|
178
|
+
|---|---|
|
|
179
|
+
| Switching lint on in a large existing codebase | baseline |
|
|
180
|
+
| One deliberate exception in one place | inline suppression with a reason |
|
|
181
|
+
| The team disagrees with a rule everywhere | `disabled_rules` |
|
|
182
|
+
| Generated or vendored sources | `excluded` |
|
|
183
|
+
| Tests need different limits than production | child config |
|
|
270
184
|
|
|
271
|
-
|
|
272
|
-
2. **Check your config** - threshold tuning may resolve it (e.g., raising `line_length` for a file with long URLs).
|
|
273
|
-
3. **Suppress with a reason** if it's genuinely incorrect.
|
|
274
|
-
4. **File an issue** at [realm/SwiftLint](https://github.com/realm/SwiftLint/issues) if the false positive is reproducible and affects others.
|
|
185
|
+
## False positives
|
|
275
186
|
|
|
276
|
-
|
|
187
|
+
1. Read the rule's page in the directory to confirm it really misfired.
|
|
188
|
+
2. Try tuning instead of silencing, for example a higher `line_length` for
|
|
189
|
+
lines dominated by long URLs.
|
|
190
|
+
3. If it is still wrong, suppress with a reason.
|
|
191
|
+
4. Report a minimal reproduction to the realm/SwiftLint issue tracker.
|
|
277
192
|
|
|
278
|
-
|
|
193
|
+
## Generated code and tests
|
|
279
194
|
|
|
280
|
-
|
|
195
|
+
Keep generated sources out of the lint pass entirely:
|
|
281
196
|
|
|
282
197
|
```yaml
|
|
283
198
|
excluded:
|
|
@@ -286,21 +201,20 @@ excluded:
|
|
|
286
201
|
- "**/*.generated.swift"
|
|
287
202
|
```
|
|
288
203
|
|
|
289
|
-
|
|
204
|
+
That is cleaner than a `disable all` at the top of each file.
|
|
290
205
|
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
Tests legitimately use patterns that production code should avoid (force unwraps, long functions, etc.). Use a child `.swiftlint.yml` in the test directory:
|
|
206
|
+
Tests get a looser child config instead of an exclusion:
|
|
294
207
|
|
|
295
208
|
```yaml
|
|
296
209
|
# Tests/.swiftlint.yml
|
|
297
210
|
disabled_rules:
|
|
298
|
-
-
|
|
299
|
-
- force_try
|
|
211
|
+
- file_length
|
|
300
212
|
- force_cast
|
|
213
|
+
- force_try
|
|
214
|
+
- force_unwrapping
|
|
301
215
|
- function_body_length
|
|
302
216
|
- type_body_length
|
|
303
|
-
- file_length
|
|
304
217
|
```
|
|
305
218
|
|
|
306
|
-
|
|
219
|
+
Tests still benefit from formatting, naming and the rest of the rules, which a
|
|
220
|
+
full exclusion would throw away.
|