@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
|
@@ -1,82 +1,95 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: swiftlint
|
|
3
|
-
description: "
|
|
3
|
+
description: "SwiftLint setup and enforcement: build tool and command plugins, Xcode run scripts, CI, .swiftlint.yml rule sets (default, opt-in, analyzer), baselines, --fix autocorrect, swiftlint:disable, reporters, strict/lenient modes, nested and remote configs, custom regex rules, rollout on existing code. Use when installing SwiftLint, configuring, tuning or suppressing rules, creating or shrinking a baseline, choosing plugin vs run script, or wiring lint into CI."
|
|
4
4
|
metadata:
|
|
5
|
-
source:
|
|
5
|
+
source: multi-agent-pipeline
|
|
6
6
|
---
|
|
7
7
|
|
|
8
8
|
# SwiftLint
|
|
9
9
|
|
|
10
|
-
SwiftLint
|
|
10
|
+
SwiftLint checks Swift source against a rule set you configure. It is the
|
|
11
|
+
linter most Swift teams reach for. It only enforces conventions; deciding what
|
|
12
|
+
the conventions are is a separate job. For naming and API shape see
|
|
13
|
+
`swift-api-design-guidelines`; for layering and module design see
|
|
14
|
+
`swift-architecture`.
|
|
11
15
|
|
|
12
|
-
|
|
16
|
+
Reference files, loaded on demand:
|
|
13
17
|
|
|
14
|
-
|
|
18
|
+
| File | Load it for |
|
|
19
|
+
|---|---|
|
|
20
|
+
| [Adoption guide](references/adoption-and-configuration.md) | install options, how configs are found and merged, thresholds, env vars, remote parents, the four-phase rollout |
|
|
21
|
+
| [Integrations guide](references/plugins-run-scripts-and-integrations.md) | build tool and command plugins, run script phases, CI recipes, reporters, toolchains, editor, Fastlane, Docker, pre-commit |
|
|
22
|
+
| [Rules and suppressions](references/rules-suppressions-and-baselines.md) | rule categories, rules people hit most, per-rule YAML, suppression syntax and policy, baselines, false positives, generated and test code |
|
|
23
|
+
| [Rule index](references/rule-reference.md) | every rule identifier, grouped by concern, with a one-line summary |
|
|
24
|
+
| [Custom rules and analyzer](references/custom-rules-and-analyze.md) | `custom_rules` regex rules, Swift-source rules, `swiftlint analyze` |
|
|
15
25
|
|
|
16
|
-
|
|
17
|
-
-
|
|
18
|
-
- [Rule Selection Strategy](#rule-selection-strategy)
|
|
19
|
-
- [Suppressions](#suppressions)
|
|
20
|
-
- [Baselines](#baselines)
|
|
21
|
-
- [Autocorrect](#autocorrect)
|
|
22
|
-
- [CI Integration](#ci-integration)
|
|
23
|
-
- [Integration Decision Tree](#integration-decision-tree)
|
|
24
|
-
- [Multiple Configurations](#multiple-configurations)
|
|
25
|
-
- [Common Mistakes](#common-mistakes)
|
|
26
|
-
- [Review Checklist](#review-checklist)
|
|
27
|
-
- [References](#references)
|
|
26
|
+
Upstream docs: https://realm.github.io/SwiftLint/ and the rule directory at
|
|
27
|
+
https://realm.github.io/SwiftLint/rule-directory.html.
|
|
28
28
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
## Recommended Setup
|
|
29
|
+
## Default setup: the build tool plugin
|
|
32
30
|
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
31
|
+
Start with `SwiftLintBuildToolPlugin`, shipped by the
|
|
32
|
+
https://github.com/SimplyDanny/SwiftLintPlugins package. Pin a version you have
|
|
33
|
+
reviewed rather than floating on the newest one.
|
|
36
34
|
|
|
37
35
|
```swift
|
|
38
36
|
// Package.swift
|
|
39
37
|
dependencies: [
|
|
40
|
-
|
|
38
|
+
.package(url: "https://github.com/SimplyDanny/SwiftLintPlugins", from: "<reviewed-version>")
|
|
39
|
+
],
|
|
40
|
+
targets: [
|
|
41
|
+
.target(
|
|
42
|
+
name: "LedgerCore",
|
|
43
|
+
plugins: [.plugin(name: "SwiftLintBuildToolPlugin", package: "SwiftLintPlugins")]
|
|
44
|
+
)
|
|
41
45
|
]
|
|
42
46
|
```
|
|
43
47
|
|
|
44
|
-
|
|
48
|
+
- An Xcode project with no `Package.swift` adds the same package from the
|
|
49
|
+
project's package settings, then turns the plugin on for each target under
|
|
50
|
+
Build Phases (or accepts it when Xcode offers the trust prompt).
|
|
51
|
+
- After that, each build triggers a lint pass by itself; you do not add a
|
|
52
|
+
run script.
|
|
53
|
+
- The first build asks whether to trust the plugin. Pick "Trust & Enable All"
|
|
54
|
+
for SwiftLintPlugins.
|
|
45
55
|
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
plugins: [.plugin(name: "SwiftLintBuildToolPlugin", package: "SwiftLintPlugins")]
|
|
50
|
-
)
|
|
51
|
-
```
|
|
56
|
+
Why the plugin wins for local work: nobody has to fix their `PATH`, package
|
|
57
|
+
resolution pins the linter version for the whole team, and it runs without
|
|
58
|
+
anyone remembering to.
|
|
52
59
|
|
|
53
|
-
|
|
60
|
+
## Which integration fits
|
|
54
61
|
|
|
55
|
-
|
|
62
|
+
| Situation | Use |
|
|
63
|
+
|---|---|
|
|
64
|
+
| SwiftPM package, or Xcode project that has a `Package.swift` | Build tool plugin from `SwiftLintPlugins` |
|
|
65
|
+
| SwiftPM, but you need CLI flags such as `--fix` or `--baseline` | Command plugin: `swift package plugin swiftlint` |
|
|
66
|
+
| Xcode project without SwiftPM, team already on Homebrew | Run script build phase |
|
|
67
|
+
| CI/CD job | Install with Homebrew or pull the Docker image, call `swiftlint` directly |
|
|
68
|
+
| Pre-commit checks | Homebrew install plus `.pre-commit-config.yaml` or a git hook script |
|
|
56
69
|
|
|
57
|
-
|
|
70
|
+
Setup steps for every row: [integrations guide](references/plugins-run-scripts-and-integrations.md).
|
|
58
71
|
|
|
59
|
-
|
|
72
|
+
## `.swiftlint.yml`
|
|
60
73
|
|
|
61
|
-
|
|
74
|
+
Put the file at the repository root. For each source file SwiftLint walks up
|
|
75
|
+
the directory tree to find its configuration.
|
|
62
76
|
|
|
63
|
-
|
|
77
|
+
A reasonable first config:
|
|
64
78
|
|
|
65
79
|
```yaml
|
|
66
|
-
# .swiftlint.yml - conservative starter config
|
|
67
80
|
disabled_rules:
|
|
68
|
-
- trailing_whitespace
|
|
69
81
|
- todo
|
|
82
|
+
- trailing_whitespace
|
|
70
83
|
|
|
71
84
|
opt_in_rules:
|
|
72
|
-
-
|
|
85
|
+
- accessibility_label_for_image
|
|
73
86
|
- closure_spacing
|
|
87
|
+
- empty_count
|
|
74
88
|
- force_unwrapping
|
|
75
|
-
- sorted_imports
|
|
76
|
-
- vertical_whitespace_opening_braces
|
|
77
89
|
- private_swiftui_state
|
|
90
|
+
- sorted_imports
|
|
78
91
|
- unhandled_throwing_task
|
|
79
|
-
-
|
|
92
|
+
- vertical_whitespace_opening_braces
|
|
80
93
|
|
|
81
94
|
included:
|
|
82
95
|
- Sources
|
|
@@ -91,249 +104,185 @@ excluded:
|
|
|
91
104
|
line_length:
|
|
92
105
|
warning: 140
|
|
93
106
|
error: 200
|
|
94
|
-
|
|
95
107
|
type_body_length:
|
|
96
108
|
warning: 300
|
|
97
109
|
error: 500
|
|
98
|
-
|
|
99
110
|
file_length:
|
|
100
111
|
warning: 500
|
|
101
112
|
error: 1000
|
|
102
113
|
```
|
|
103
114
|
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
| Key | Purpose |
|
|
107
|
-
|-----|---------|
|
|
108
|
-
| `disabled_rules` | Turn off default-enabled rules |
|
|
109
|
-
| `opt_in_rules` | Turn on rules not enabled by default |
|
|
110
|
-
| `only_rules` | Use _only_ the listed rules (mutually exclusive with `disabled_rules`/`opt_in_rules`) |
|
|
111
|
-
| `analyzer_rules` | Rules requiring compiler logs (run via `swiftlint analyze`) |
|
|
112
|
-
| `baseline` | Path to an existing baseline file used to suppress known violations |
|
|
113
|
-
| `write_baseline` | Path where SwiftLint should write a new baseline file |
|
|
114
|
-
| `included` | Paths to lint (default: current directory) |
|
|
115
|
-
| `excluded` | Paths to skip |
|
|
116
|
-
| `strict` | Elevate all warnings to errors |
|
|
117
|
-
| `lenient` | Downgrade all errors to warnings |
|
|
118
|
-
| `allow_zero_lintable_files` | Suppress the error when no Swift files are found |
|
|
119
|
-
| `reporter` | Output format: `xcode` (default), `json`, `checkstyle`, `sarif`, `csv`, `emoji`, etc. |
|
|
115
|
+
Top-level keys:
|
|
120
116
|
|
|
121
|
-
|
|
117
|
+
| Key | Effect |
|
|
118
|
+
|---|---|
|
|
119
|
+
| `disabled_rules` | switches off rules that are on by default |
|
|
120
|
+
| `opt_in_rules` | switches on rules that ship disabled |
|
|
121
|
+
| `only_rules` | runs exactly this list and nothing else; cannot be combined with `disabled_rules` or `opt_in_rules` |
|
|
122
|
+
| `analyzer_rules` | rules that need compiler logs; they run only under `swiftlint analyze` |
|
|
123
|
+
| `baseline` | path of an existing baseline whose violations are ignored |
|
|
124
|
+
| `write_baseline` | path where a fresh baseline is written |
|
|
125
|
+
| `included` | paths to lint; the current directory when omitted |
|
|
126
|
+
| `excluded` | paths to skip |
|
|
127
|
+
| `strict` | promotes warnings to errors |
|
|
128
|
+
| `lenient` | demotes errors to warnings |
|
|
129
|
+
| `allow_zero_lintable_files` | finding no Swift files is not an error |
|
|
130
|
+
| `reporter` | output format: `xcode` by default, plus `json`, `checkstyle`, `sarif`, `csv`, `emoji` and more |
|
|
122
131
|
|
|
123
|
-
|
|
132
|
+
Thresholds, nesting and remote parents: [adoption and configuration](references/adoption-and-configuration.md).
|
|
124
133
|
|
|
125
|
-
|
|
134
|
+
## Picking rules
|
|
126
135
|
|
|
127
|
-
|
|
128
|
-
2. **Opt-in rules** - disabled by default, enable selectively via `opt_in_rules`
|
|
129
|
-
3. **Analyzer rules** - require compiler logs, enabled via `analyzer_rules`
|
|
136
|
+
Rules fall into three buckets:
|
|
130
137
|
|
|
131
|
-
|
|
138
|
+
- **Default**: on unless disabled; conventions most Swift code already follows.
|
|
139
|
+
- **Opt-in**: off until listed under `opt_in_rules`; more opinionated.
|
|
140
|
+
- **Analyzer**: need compiler logs; listed under `analyzer_rules`.
|
|
132
141
|
|
|
133
|
-
|
|
142
|
+
The authoritative list with options is the rule directory
|
|
143
|
+
(https://realm.github.io/SwiftLint/rule-directory.html). Do not try to learn
|
|
144
|
+
it by heart or paste it into docs; look a rule up when you need it. The local
|
|
145
|
+
[rule reference](references/rule-reference.md) is an offline index.
|
|
134
146
|
|
|
135
|
-
|
|
136
|
-
2. Disable rules that conflict with your team's established conventions.
|
|
137
|
-
3. Add opt-in rules one at a time. Review violations before committing each addition.
|
|
138
|
-
4. Do not use `only_rules` unless you have a specific reason to start from zero.
|
|
147
|
+
Greenfield project:
|
|
139
148
|
|
|
140
|
-
|
|
149
|
+
1. Run with defaults. `swiftlint rules` prints what is enabled.
|
|
150
|
+
2. Disable the few defaults that contradict agreed team conventions.
|
|
151
|
+
3. Turn on opt-in rules individually, and look at what each one reports
|
|
152
|
+
before you commit it.
|
|
153
|
+
4. Leave `only_rules` alone unless you have a concrete reason to begin from an
|
|
154
|
+
empty set.
|
|
141
155
|
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
156
|
+
Existing codebase: keep the defaults, capture every current violation in a
|
|
157
|
+
baseline, make CI reject any new violation, then pay the baseline down over
|
|
158
|
+
time. The full plan is the rollout section of
|
|
159
|
+
[adoption and configuration](references/adoption-and-configuration.md).
|
|
146
160
|
|
|
147
|
-
|
|
161
|
+
## Suppressing a rule
|
|
148
162
|
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
Suppress SwiftLint for specific lines when a rule produces a false positive or when the violation is intentional and reviewed.
|
|
163
|
+
Suppress only a confirmed false positive or a violation the team reviewed and
|
|
164
|
+
accepted. Every form names the rule:
|
|
152
165
|
|
|
153
166
|
```swift
|
|
154
167
|
// swiftlint:disable:next force_cast
|
|
155
|
-
let
|
|
168
|
+
let cell = table.dequeueReusableCell(withIdentifier: "Invoice") as! InvoiceCell
|
|
156
169
|
|
|
157
|
-
let
|
|
170
|
+
let seed = try! Data(contentsOf: seedURL) // swiftlint:disable:this force_try
|
|
158
171
|
|
|
172
|
+
func bounds() -> (Double, Double, Double, Double, Double) { (0, 0, 0, 0, 0) }
|
|
159
173
|
// swiftlint:disable:previous large_tuple
|
|
160
|
-
```
|
|
161
174
|
|
|
162
|
-
Disable for a region:
|
|
163
|
-
|
|
164
|
-
```swift
|
|
165
175
|
// swiftlint:disable cyclomatic_complexity
|
|
166
|
-
func
|
|
176
|
+
func open(_ link: DeepLink) {
|
|
177
|
+
// long switch over link kinds
|
|
178
|
+
}
|
|
167
179
|
// swiftlint:enable cyclomatic_complexity
|
|
168
180
|
```
|
|
169
181
|
|
|
170
|
-
|
|
182
|
+
`// swiftlint:disable all` with a matching `// swiftlint:enable all` turns off
|
|
183
|
+
everything in between. Keep it for generated or legacy code.
|
|
171
184
|
|
|
172
|
-
|
|
173
|
-
// swiftlint:disable all
|
|
174
|
-
// ... generated or legacy code ...
|
|
175
|
-
// swiftlint:enable all
|
|
176
|
-
```
|
|
185
|
+
House rules:
|
|
177
186
|
|
|
178
|
-
|
|
179
|
-
-
|
|
180
|
-
-
|
|
181
|
-
-
|
|
182
|
-
- For test targets with different tolerance, use a child configuration (see [Multiple Configurations](#multiple-configurations)).
|
|
187
|
+
- One named rule beats `all`.
|
|
188
|
+
- Close every region with `enable`.
|
|
189
|
+
- Generated sources belong in `excluded`, not behind inline comments.
|
|
190
|
+
- Tests that tolerate more get their own child configuration.
|
|
183
191
|
|
|
184
|
-
|
|
192
|
+
Syntax details and review policy: [rules and suppressions](references/rules-suppressions-and-baselines.md).
|
|
185
193
|
|
|
186
194
|
## Baselines
|
|
187
195
|
|
|
188
|
-
|
|
196
|
+
A baseline lets you switch the linter on today without first fixing years of
|
|
197
|
+
old violations.
|
|
189
198
|
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
swiftlint --write-baseline .swiftlint.baseline
|
|
194
|
-
```
|
|
195
|
-
|
|
196
|
-
This records all current violations. Future runs compare against this baseline and only report new violations.
|
|
197
|
-
|
|
198
|
-
**Use the baseline:**
|
|
199
|
-
|
|
200
|
-
```sh
|
|
201
|
-
swiftlint --baseline .swiftlint.baseline
|
|
199
|
+
```bash
|
|
200
|
+
swiftlint --write-baseline .swiftlint.baseline # snapshot every current violation
|
|
201
|
+
swiftlint --baseline .swiftlint.baseline # report only violations not in the snapshot
|
|
202
202
|
```
|
|
203
203
|
|
|
204
|
-
In CI
|
|
205
|
-
|
|
206
|
-
For baseline workflows and rollout strategy, see [references/rules-suppressions-and-baselines.md](references/rules-suppressions-and-baselines.md).
|
|
204
|
+
In CI always pass `--baseline`, so only new problems fail the job. Fix old
|
|
205
|
+
violations, regenerate the file, and commit the smaller version.
|
|
207
206
|
|
|
208
207
|
## Autocorrect
|
|
209
208
|
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
```sh
|
|
213
|
-
swiftlint --fix
|
|
214
|
-
# or the legacy alias:
|
|
215
|
-
swiftlint --autocorrect
|
|
216
|
-
```
|
|
209
|
+
`swiftlint --fix` rewrites what it can; `--autocorrect` is the older spelling
|
|
210
|
+
of the same thing.
|
|
217
211
|
|
|
218
|
-
|
|
212
|
+
- Never put `--fix` in a build phase that runs before compiling. It edits the
|
|
213
|
+
files being built on every build, which turns builds into an unpredictable
|
|
214
|
+
edit loop and can hide the real problem.
|
|
215
|
+
- Run it by hand or in a dedicated CI job and read the diff.
|
|
216
|
+
- Only some rules can correct themselves. The "Correctable" column of
|
|
217
|
+
`swiftlint rules` shows which.
|
|
218
|
+
- Commit or stash your work first.
|
|
219
219
|
|
|
220
|
-
|
|
221
|
-
- Run `--fix` manually or in a dedicated CI step, then review the diff.
|
|
222
|
-
- Not all rules support autocorrect. Check `swiftlint rules` - the "Correctable" column shows which rules can auto-fix.
|
|
223
|
-
- Always commit or stash before running `--fix`.
|
|
220
|
+
## CI
|
|
224
221
|
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
CI is the primary enforcement surface. A CI check ensures no one merges code that increases the violation count.
|
|
228
|
-
|
|
229
|
-
**Recommended CI pattern:**
|
|
222
|
+
CI is where the rules actually bite: a merge that raises the violation count
|
|
223
|
+
should be blocked.
|
|
230
224
|
|
|
231
225
|
```yaml
|
|
232
|
-
# GitHub Actions example
|
|
233
226
|
- name: Lint
|
|
234
227
|
run: |
|
|
235
228
|
brew install swiftlint
|
|
236
|
-
swiftlint
|
|
229
|
+
swiftlint lint --reporter sarif --strict > lint.sarif
|
|
237
230
|
```
|
|
238
231
|
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
| `--reporter sarif` | GitHub Advanced Security compatible output |
|
|
245
|
-
| `--reporter json` | Machine-readable output |
|
|
246
|
-
| `--reporter checkstyle` | Jenkins/SonarQube compatible |
|
|
247
|
-
| `--baseline .swiftlint.baseline` | Only fail on new violations |
|
|
248
|
-
|
|
249
|
-
For SARIF upload to GitHub code scanning, add `github/codeql-action/upload-sarif` after the lint step.
|
|
250
|
-
|
|
251
|
-
For full CI recipes and reporter details, see [references/plugins-run-scripts-and-integrations.md](references/plugins-run-scripts-and-integrations.md).
|
|
252
|
-
|
|
253
|
-
## Integration Decision Tree
|
|
254
|
-
|
|
255
|
-
Choose how to run SwiftLint based on project shape:
|
|
256
|
-
|
|
257
|
-
| Scenario | Recommended integration |
|
|
258
|
-
|----------|------------------------|
|
|
259
|
-
| SwiftPM package or Xcode project with `Package.swift` | Build tool plugin via `SwiftLintPlugins` |
|
|
260
|
-
| SwiftPM project needing CLI flags (`--fix`, `--baseline`) | Command plugin: `swift package plugin swiftlint` |
|
|
261
|
-
| Xcode project without SwiftPM, team uses Homebrew | Run script build phase |
|
|
262
|
-
| CI/CD pipeline | Homebrew or Docker install, run `swiftlint` directly |
|
|
263
|
-
| Pre-commit hook | Homebrew install + `.pre-commit-config.yaml` or git hook script |
|
|
232
|
+
- `--strict`: any warning makes the exit code non-zero.
|
|
233
|
+
- `--reporter sarif`: feeds code scanning (GitHub Advanced Security).
|
|
234
|
+
- `--reporter json`: for your own tooling.
|
|
235
|
+
- `--reporter checkstyle`: for Jenkins or SonarQube.
|
|
236
|
+
- `--baseline .swiftlint.baseline`: fail only on new violations.
|
|
264
237
|
|
|
265
|
-
|
|
238
|
+
After the lint step, upload the SARIF file with
|
|
239
|
+
`github/codeql-action/upload-sarif`. More recipes (GitLab, Bitrise, Docker,
|
|
240
|
+
annotations): [integrations guide](references/plugins-run-scripts-and-integrations.md).
|
|
266
241
|
|
|
267
|
-
|
|
242
|
+
## Several configurations
|
|
268
243
|
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
- **Relaxed test config**: place a `.swiftlint.yml` in `Tests/` that disables `force_unwrapping` and raises `file_length`
|
|
276
|
-
- **Strict module config**: place a stricter `.swiftlint.yml` in a shared module directory
|
|
277
|
-
- **Remote config**: use `parent_config` with an HTTPS URL to pull a shared team config (caching supported)
|
|
244
|
+
- A nested `.swiftlint.yml` starts from its parent's settings and changes
|
|
245
|
+
only what it states.
|
|
246
|
+
- Typical uses: a looser `Tests/.swiftlint.yml` that disables
|
|
247
|
+
`force_unwrapping` and raises `file_length`; a tighter file in a shared
|
|
248
|
+
module; a `parent_config` pointing at an HTTPS URL for an organisation-wide
|
|
249
|
+
base, which SwiftLint caches.
|
|
278
250
|
|
|
279
251
|
```yaml
|
|
280
|
-
# Tests/.swiftlint.yml
|
|
252
|
+
# Tests/.swiftlint.yml
|
|
281
253
|
disabled_rules:
|
|
282
|
-
- force_unwrapping
|
|
283
254
|
- force_try
|
|
284
|
-
|
|
255
|
+
- force_unwrapping
|
|
285
256
|
file_length:
|
|
286
257
|
warning: 800
|
|
287
258
|
```
|
|
288
259
|
|
|
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
|
-
- [ ] `.swiftlint.yml` exists at the project root with explicit `included`/`excluded` paths
|
|
320
|
-
- [ ] SwiftLint version is pinned (via SPM plugin resolution, Brewfile, or CI config)
|
|
321
|
-
- [ ] Build tool plugin is enabled for each target that should be linted
|
|
322
|
-
- [ ] CI runs `swiftlint --strict` (or with `--baseline` for incremental adoption)
|
|
323
|
-
- [ ] No `--fix` / `--autocorrect` in build phases
|
|
324
|
-
- [ ] Inline suppressions target specific rules, not `all`
|
|
325
|
-
- [ ] Inline suppressions include a comment explaining why
|
|
326
|
-
- [ ] Test targets have appropriate config (relaxed rules via child config, not excluded entirely)
|
|
327
|
-
- [ ] Autocorrect changes are reviewed in a separate commit
|
|
328
|
-
- [ ] New opt-in rules are added one at a time with team consensus
|
|
329
|
-
|
|
330
|
-
## References
|
|
331
|
-
|
|
332
|
-
- [references/adoption-and-configuration.md](references/adoption-and-configuration.md) - Installation paths, `.swiftlint.yml` deep dive, severity tuning, environment variables, nested/remote configs, rollout strategy
|
|
333
|
-
- [references/plugins-run-scripts-and-integrations.md](references/plugins-run-scripts-and-integrations.md) - Build tool plugin, command plugin, run scripts, CI recipes, multi-toolchain guidance, VS Code, Fastlane, Docker, pre-commit
|
|
334
|
-
- [references/rules-suppressions-and-baselines.md](references/rules-suppressions-and-baselines.md) - Default vs opt-in vs analyzer rules, suppression syntax, baseline workflows, false-positive handling
|
|
335
|
-
- [references/rule-reference.md](references/rule-reference.md) - Bundled exhaustive rule index for local lookup; verify current details with `swiftlint rules` or the official rule directory
|
|
336
|
-
- [references/custom-rules-and-analyze.md](references/custom-rules-and-analyze.md) - Regex custom rules, Swift custom rules (brief), `swiftlint analyze`, compiler-log workflow
|
|
337
|
-
- [SwiftLint documentation](https://realm.github.io/SwiftLint/) - Official docs
|
|
338
|
-
- [SwiftLint rule directory](https://realm.github.io/SwiftLint/rule-directory.html) - Full categorized rule list
|
|
339
|
-
- [SimplyDanny/SwiftLintPlugins](https://github.com/SimplyDanny/SwiftLintPlugins) - Recommended plugin package
|
|
260
|
+
- On the command line, `swiftlint --config .swiftlint.yml --config .swiftlint-extra.yml`
|
|
261
|
+
merges both; the later file wins where keys overlap.
|
|
262
|
+
|
|
263
|
+
## Mistakes that keep showing up
|
|
264
|
+
|
|
265
|
+
| Mistake | Fix |
|
|
266
|
+
|---|---|
|
|
267
|
+
| `--fix` wired into a build phase | Run it manually or in CI and review the diff |
|
|
268
|
+
| `only_rules` chosen without realising it turns every other rule off | Use `disabled_rules` plus `opt_in_rules` |
|
|
269
|
+
| `swiftlint:disable all` with no `enable` | The rest of the file silently stops being linted; always close the region |
|
|
270
|
+
| Linter version not pinned | Default rule sets change between releases; pin through the SwiftPM plugin, a Brewfile or the CI config |
|
|
271
|
+
| `Tests/` excluded wholesale | Give tests a relaxed child config instead |
|
|
272
|
+
| SwiftLint built for a different Swift toolchain | Parse errors; match the project's toolchain |
|
|
273
|
+
| A dozen opt-in rules enabled at once on a big codebase | Add them one at a time, with a baseline |
|
|
274
|
+
| No `included` paths | SwiftLint crawls the whole working directory, vendored and generated code included |
|
|
275
|
+
|
|
276
|
+
## Review checklist
|
|
277
|
+
|
|
278
|
+
- [ ] A root `.swiftlint.yml` exists with explicit `included` and `excluded`.
|
|
279
|
+
- [ ] The SwiftLint version is fixed, by SwiftPM resolution of the plugin, a
|
|
280
|
+
Brewfile entry or the CI job definition.
|
|
281
|
+
- [ ] The build tool plugin is attached to every target that should be linted.
|
|
282
|
+
- [ ] CI runs `swiftlint --strict`, with `--baseline` while adoption is in progress.
|
|
283
|
+
- [ ] No build phase runs `--fix` or `--autocorrect`.
|
|
284
|
+
- [ ] Inline suppressions name specific rules, never `all`.
|
|
285
|
+
- [ ] Each inline suppression carries a short reason.
|
|
286
|
+
- [ ] Test targets use a relaxed child config rather than being excluded.
|
|
287
|
+
- [ ] Autocorrect output lands in its own commit and is reviewed.
|
|
288
|
+
- [ ] Each new opt-in rule arrives in its own change, after the team agrees.
|