@mmerterden/multi-agent-pipeline 20.6.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.
Files changed (326) hide show
  1. package/CHANGELOG.md +27 -0
  2. package/LICENSE +0 -10
  3. package/docs/facts.json +1 -1
  4. package/manifest.json +328 -329
  5. package/package.json +2 -2
  6. package/pipeline/multi-agent-refs/features/design-conformance.md +62 -64
  7. package/pipeline/scripts/_notices.mjs +12 -1
  8. package/pipeline/scripts/gen-skills-index.mjs +1 -1
  9. package/pipeline/skills/.skill-manifest.json +106 -106
  10. package/pipeline/skills/shared/README.md +71 -71
  11. package/pipeline/skills/shared/external/agent-introspection-debugging/SKILL.md +1 -0
  12. package/pipeline/skills/shared/external/alarmkit/SKILL.md +373 -381
  13. package/pipeline/skills/shared/external/alarmkit/evals/evals.json +23 -18
  14. package/pipeline/skills/shared/external/alarmkit/references/alarmkit-patterns.md +328 -378
  15. package/pipeline/skills/shared/external/android-architecture/SKILL.md +2 -0
  16. package/pipeline/skills/shared/external/android-performance/SKILL.md +2 -0
  17. package/pipeline/skills/shared/external/android-security/SKILL.md +2 -0
  18. package/pipeline/skills/shared/external/app-clips/SKILL.md +260 -160
  19. package/pipeline/skills/shared/external/app-clips/evals/evals.json +27 -27
  20. package/pipeline/skills/shared/external/app-clips/references/data-handoff-notifications-location.md +150 -83
  21. package/pipeline/skills/shared/external/app-clips/references/routing-and-experiences.md +135 -83
  22. package/pipeline/skills/shared/external/app-clips/references/size-capabilities-and-promotion.md +143 -85
  23. package/pipeline/skills/shared/external/app-intents/SKILL.md +302 -304
  24. package/pipeline/skills/shared/external/app-intents/evals/evals.json +21 -21
  25. package/pipeline/skills/shared/external/app-intents/references/appintents-advanced.md +594 -894
  26. package/pipeline/skills/shared/external/app-store-optimization/SKILL.md +339 -277
  27. package/pipeline/skills/shared/external/app-store-optimization/evals/evals.json +27 -23
  28. package/pipeline/skills/shared/external/app-store-optimization/references/keyword-research-methodology.md +105 -122
  29. package/pipeline/skills/shared/external/app-store-optimization/references/product-page-variants.md +143 -166
  30. package/pipeline/skills/shared/external/app-store-review/SKILL.md +307 -326
  31. package/pipeline/skills/shared/external/app-store-review/evals/evals.json +21 -21
  32. package/pipeline/skills/shared/external/app-store-review/references/privacy-manifest.md +105 -67
  33. package/pipeline/skills/shared/external/app-store-review/references/review-checklists.md +114 -101
  34. package/pipeline/skills/shared/external/apple-on-device-ai/SKILL.md +333 -360
  35. package/pipeline/skills/shared/external/apple-on-device-ai/evals/evals.json +24 -27
  36. package/pipeline/skills/shared/external/apple-on-device-ai/references/coreml-conversion.md +215 -322
  37. package/pipeline/skills/shared/external/apple-on-device-ai/references/coreml-optimization.md +161 -256
  38. package/pipeline/skills/shared/external/apple-on-device-ai/references/foundation-models.md +277 -387
  39. package/pipeline/skills/shared/external/apple-on-device-ai/references/mlx-swift.md +196 -210
  40. package/pipeline/skills/shared/external/authentication/SKILL.md +265 -381
  41. package/pipeline/skills/shared/external/authentication/evals/evals.json +25 -25
  42. package/pipeline/skills/shared/external/authentication/references/keychain-biometric.md +133 -178
  43. package/pipeline/skills/shared/external/authentication/references/passkeys.md +111 -147
  44. package/pipeline/skills/shared/external/avkit/SKILL.md +267 -364
  45. package/pipeline/skills/shared/external/avkit/evals/evals.json +26 -26
  46. package/pipeline/skills/shared/external/avkit/references/avkit-patterns.md +375 -493
  47. package/pipeline/skills/shared/external/background-processing/SKILL.md +270 -382
  48. package/pipeline/skills/shared/external/background-processing/evals/evals.json +22 -22
  49. package/pipeline/skills/shared/external/background-processing/references/background-task-patterns.md +169 -317
  50. package/pipeline/skills/shared/external/backlog/BACKLOG.md +1 -1
  51. package/pipeline/skills/shared/external/backlog/SKILL.md +56 -33
  52. package/pipeline/skills/shared/external/callkit-voip/SKILL.md +290 -371
  53. package/pipeline/skills/shared/external/callkit-voip/evals/evals.json +24 -24
  54. package/pipeline/skills/shared/external/callkit-voip/references/callkit-patterns.md +175 -343
  55. package/pipeline/skills/shared/external/ci-cd-pipelines/SKILL.md +1 -0
  56. package/pipeline/skills/shared/external/cloudkit-sync/SKILL.md +292 -381
  57. package/pipeline/skills/shared/external/cloudkit-sync/evals/evals.json +33 -30
  58. package/pipeline/skills/shared/external/cloudkit-sync/references/cloudkit-patterns.md +227 -355
  59. package/pipeline/skills/shared/external/compose-components/SKILL.md +2 -0
  60. package/pipeline/skills/shared/external/compose-navigation/SKILL.md +3 -2
  61. package/pipeline/skills/shared/external/compose-testing/SKILL.md +2 -0
  62. package/pipeline/skills/shared/external/contacts-framework/SKILL.md +197 -346
  63. package/pipeline/skills/shared/external/contacts-framework/evals/evals.json +19 -21
  64. package/pipeline/skills/shared/external/contacts-framework/references/contacts-patterns.md +169 -308
  65. package/pipeline/skills/shared/external/core-bluetooth/SKILL.md +226 -376
  66. package/pipeline/skills/shared/external/core-bluetooth/evals/evals.json +25 -22
  67. package/pipeline/skills/shared/external/core-bluetooth/references/ble-patterns.md +257 -337
  68. package/pipeline/skills/shared/external/core-data/SKILL.md +292 -368
  69. package/pipeline/skills/shared/external/core-data/evals/evals.json +30 -27
  70. package/pipeline/skills/shared/external/core-motion/SKILL.md +235 -324
  71. package/pipeline/skills/shared/external/core-motion/evals/evals.json +31 -27
  72. package/pipeline/skills/shared/external/core-motion/references/motion-patterns.md +210 -310
  73. package/pipeline/skills/shared/external/core-nfc/SKILL.md +292 -366
  74. package/pipeline/skills/shared/external/core-nfc/evals/evals.json +22 -24
  75. package/pipeline/skills/shared/external/core-nfc/references/nfc-patterns.md +233 -329
  76. package/pipeline/skills/shared/external/coreml/SKILL.md +323 -367
  77. package/pipeline/skills/shared/external/coreml/evals/evals.json +24 -21
  78. package/pipeline/skills/shared/external/coreml/references/coreml-swift-integration.md +562 -565
  79. package/pipeline/skills/shared/external/council/SKILL.md +1 -0
  80. package/pipeline/skills/shared/external/cryptokit/SKILL.md +253 -394
  81. package/pipeline/skills/shared/external/cryptokit/evals/evals.json +20 -18
  82. package/pipeline/skills/shared/external/cryptokit/references/cryptokit-patterns.md +299 -488
  83. package/pipeline/skills/shared/external/css-modern/SKILL.md +1 -0
  84. package/pipeline/skills/shared/external/database-patterns/SKILL.md +1 -0
  85. package/pipeline/skills/shared/external/debugging-instruments/SKILL.md +270 -323
  86. package/pipeline/skills/shared/external/debugging-instruments/evals/evals.json +27 -30
  87. package/pipeline/skills/shared/external/debugging-instruments/references/instruments-guide.md +167 -315
  88. package/pipeline/skills/shared/external/debugging-instruments/references/lldb-patterns.md +140 -193
  89. package/pipeline/skills/shared/external/device-integrity/SKILL.md +230 -353
  90. package/pipeline/skills/shared/external/device-integrity/evals/evals.json +25 -21
  91. package/pipeline/skills/shared/external/device-integrity/references/device-integrity-patterns.md +159 -197
  92. package/pipeline/skills/shared/external/energykit/SKILL.md +225 -392
  93. package/pipeline/skills/shared/external/energykit/evals/evals.json +29 -28
  94. package/pipeline/skills/shared/external/energykit/references/energykit-patterns.md +174 -470
  95. package/pipeline/skills/shared/external/eventkit-calendar/SKILL.md +261 -383
  96. package/pipeline/skills/shared/external/eventkit-calendar/evals/evals.json +25 -22
  97. package/pipeline/skills/shared/external/eventkit-calendar/references/eventkit-patterns.md +165 -268
  98. package/pipeline/skills/shared/external/evidence-github/SKILL.md +2 -0
  99. package/pipeline/skills/shared/external/evidence-registry/SKILL.md +2 -0
  100. package/pipeline/skills/shared/external/gradle-kotlin-dsl/SKILL.md +2 -0
  101. package/pipeline/skills/shared/external/healthkit/SKILL.md +252 -303
  102. package/pipeline/skills/shared/external/healthkit/evals/evals.json +24 -23
  103. package/pipeline/skills/shared/external/healthkit/references/healthkit-patterns.md +369 -523
  104. package/pipeline/skills/shared/external/homekit-matter/SKILL.md +233 -348
  105. package/pipeline/skills/shared/external/homekit-matter/evals/evals.json +27 -22
  106. package/pipeline/skills/shared/external/homekit-matter/references/matter-commissioning.md +199 -305
  107. package/pipeline/skills/shared/external/html-semantic/SKILL.md +1 -0
  108. package/pipeline/skills/shared/external/humanizer/SKILL.md +1 -0
  109. package/pipeline/skills/shared/external/ios-accessibility/SKILL.md +368 -340
  110. package/pipeline/skills/shared/external/ios-accessibility/evals/evals.json +28 -27
  111. package/pipeline/skills/shared/external/ios-accessibility/references/a11y-patterns.md +314 -260
  112. package/pipeline/skills/shared/external/ios-accessibility/references/media-accessibility.md +97 -67
  113. package/pipeline/skills/shared/external/ios-accessibility/references/nutrition-labels.md +165 -101
  114. package/pipeline/skills/shared/external/ios-coding-standard/SKILL.md +1 -0
  115. package/pipeline/skills/shared/external/ios-localization/SKILL.md +258 -371
  116. package/pipeline/skills/shared/external/ios-localization/evals/evals.json +23 -23
  117. package/pipeline/skills/shared/external/ios-localization/references/formatstyle-locale.md +283 -491
  118. package/pipeline/skills/shared/external/ios-localization/references/string-catalogs.md +313 -440
  119. package/pipeline/skills/shared/external/ios-module-structure/SKILL.md +1 -0
  120. package/pipeline/skills/shared/external/ios-networking/SKILL.md +265 -341
  121. package/pipeline/skills/shared/external/ios-networking/evals/evals.json +24 -24
  122. package/pipeline/skills/shared/external/ios-networking/references/background-websocket.md +425 -652
  123. package/pipeline/skills/shared/external/ios-networking/references/file-storage-patterns.md +143 -285
  124. package/pipeline/skills/shared/external/ios-networking/references/lightweight-clients.md +93 -53
  125. package/pipeline/skills/shared/external/ios-networking/references/network-framework.md +231 -456
  126. package/pipeline/skills/shared/external/ios-networking/references/urlsession-patterns.md +517 -784
  127. package/pipeline/skills/shared/external/ios-security/SKILL.md +2 -0
  128. package/pipeline/skills/shared/external/ios-simulator/SKILL.md +265 -393
  129. package/pipeline/skills/shared/external/ios-simulator/evals/evals.json +21 -21
  130. package/pipeline/skills/shared/external/ios-simulator/references/simctl-commands.md +177 -270
  131. package/pipeline/skills/shared/external/live-activities/SKILL.md +318 -360
  132. package/pipeline/skills/shared/external/live-activities/evals/evals.json +21 -21
  133. package/pipeline/skills/shared/external/live-activities/references/activitykit-patterns.md +478 -710
  134. package/pipeline/skills/shared/external/localization-reuse-map/SKILL.md +91 -283
  135. package/pipeline/skills/shared/external/localization-reuse-map/reference/format-and-output.md +119 -151
  136. package/pipeline/skills/shared/external/localization-reuse-map/reference/publish-and-snapshot.md +60 -90
  137. package/pipeline/skills/shared/external/localization-reuse-map/reference/sources-and-recipes.md +119 -156
  138. package/pipeline/skills/shared/external/localization-reuse-map/scripts/build-artifact.py +726 -787
  139. package/pipeline/skills/shared/external/localization-reuse-map/scripts/build-spreadsheet.py +253 -288
  140. package/pipeline/skills/shared/external/localization-reuse-map/scripts/fetch-annotations.py +243 -304
  141. package/pipeline/skills/shared/external/localization-reuse-map/scripts/fetch-legacy-labels.py +88 -104
  142. package/pipeline/skills/shared/external/localization-reuse-map/scripts/publish-confluence.py +181 -235
  143. package/pipeline/skills/shared/external/localization-reuse-map/scripts/render-key-shots.py +198 -263
  144. package/pipeline/skills/shared/external/localization-reuse-map/scripts/render-overlay.py +461 -466
  145. package/pipeline/skills/shared/external/localization-reuse-map/scripts/resolve-legacy-values.py +145 -151
  146. package/pipeline/skills/shared/external/localization-reuse-map/scripts/resolve-new-values.py +123 -141
  147. package/pipeline/skills/shared/external/localization-reuse-map/scripts/scan-screen-keys.py +146 -157
  148. package/pipeline/skills/shared/external/localization-reuse-map/scripts/snapshot-resources.sh +22 -19
  149. package/pipeline/skills/shared/external/localization-reuse-map/scripts/verify-map.py +156 -140
  150. package/pipeline/skills/shared/external/mapkit-location/SKILL.md +295 -267
  151. package/pipeline/skills/shared/external/mapkit-location/evals/evals.json +28 -24
  152. package/pipeline/skills/shared/external/mapkit-location/references/mapkit-corelocation-patterns.md +378 -532
  153. package/pipeline/skills/shared/external/mapkit-location/references/mapkit-patterns.md +397 -499
  154. package/pipeline/skills/shared/external/metrickit-diagnostics/SKILL.md +165 -348
  155. package/pipeline/skills/shared/external/metrickit-diagnostics/evals/evals.json +26 -23
  156. package/pipeline/skills/shared/external/metrickit-diagnostics/references/metrickit-patterns.md +123 -130
  157. package/pipeline/skills/shared/external/musickit-audio/SKILL.md +189 -315
  158. package/pipeline/skills/shared/external/musickit-audio/evals/evals.json +22 -21
  159. package/pipeline/skills/shared/external/musickit-audio/references/musickit-patterns.md +181 -270
  160. package/pipeline/skills/shared/external/natural-language/SKILL.md +188 -340
  161. package/pipeline/skills/shared/external/natural-language/evals/evals.json +21 -21
  162. package/pipeline/skills/shared/external/natural-language/references/translation-patterns.md +171 -225
  163. package/pipeline/skills/shared/external/nextjs-app-router/SKILL.md +1 -0
  164. package/pipeline/skills/shared/external/passkit-wallet/SKILL.md +258 -392
  165. package/pipeline/skills/shared/external/passkit-wallet/evals/evals.json +30 -29
  166. package/pipeline/skills/shared/external/passkit-wallet/references/wallet-passes.md +164 -231
  167. package/pipeline/skills/shared/external/pdfkit/SKILL.md +312 -344
  168. package/pipeline/skills/shared/external/pdfkit/evals/evals.json +19 -19
  169. package/pipeline/skills/shared/external/pdfkit/references/pdfkit-patterns.md +413 -624
  170. package/pipeline/skills/shared/external/pencilkit-drawing/SKILL.md +242 -358
  171. package/pipeline/skills/shared/external/pencilkit-drawing/evals/evals.json +25 -21
  172. package/pipeline/skills/shared/external/pencilkit-drawing/references/pencilkit-patterns.md +161 -226
  173. package/pipeline/skills/shared/external/permissionkit/SKILL.md +282 -400
  174. package/pipeline/skills/shared/external/permissionkit/evals/evals.json +27 -30
  175. package/pipeline/skills/shared/external/permissionkit/references/permissionkit-patterns.md +237 -350
  176. package/pipeline/skills/shared/external/photos-camera-media/SKILL.md +276 -325
  177. package/pipeline/skills/shared/external/photos-camera-media/references/av-playback.md +299 -545
  178. package/pipeline/skills/shared/external/photos-camera-media/references/camera-capture.md +344 -588
  179. package/pipeline/skills/shared/external/photos-camera-media/references/image-loading-caching.md +316 -660
  180. package/pipeline/skills/shared/external/photos-camera-media/references/photokit-patterns.md +270 -416
  181. package/pipeline/skills/shared/external/play-store-review/SKILL.md +2 -0
  182. package/pipeline/skills/shared/external/push-notifications/SKILL.md +312 -340
  183. package/pipeline/skills/shared/external/push-notifications/evals/evals.json +27 -26
  184. package/pipeline/skills/shared/external/push-notifications/references/notification-patterns.md +328 -485
  185. package/pipeline/skills/shared/external/push-notifications/references/rich-notifications.md +327 -560
  186. package/pipeline/skills/shared/external/python-patterns/SKILL.md +1 -0
  187. package/pipeline/skills/shared/external/react-best-practices/SKILL.md +1 -0
  188. package/pipeline/skills/shared/external/realitykit-ar/SKILL.md +218 -410
  189. package/pipeline/skills/shared/external/realitykit-ar/evals/evals.json +24 -27
  190. package/pipeline/skills/shared/external/realitykit-ar/references/realitykit-patterns.md +221 -348
  191. package/pipeline/skills/shared/external/rest-api-design/SKILL.md +1 -0
  192. package/pipeline/skills/shared/external/retrofit-networking/SKILL.md +2 -0
  193. package/pipeline/skills/shared/external/room-database/SKILL.md +2 -0
  194. package/pipeline/skills/shared/external/search-first/SKILL.md +1 -0
  195. package/pipeline/skills/shared/external/shareplay-activities/SKILL.md +222 -393
  196. package/pipeline/skills/shared/external/shareplay-activities/evals/evals.json +23 -24
  197. package/pipeline/skills/shared/external/shareplay-activities/references/shareplay-patterns.md +280 -420
  198. package/pipeline/skills/shared/external/signal-community/SKILL.md +2 -0
  199. package/pipeline/skills/shared/external/skill-creator/SKILL.md +80 -41
  200. package/pipeline/skills/shared/external/skill-creator/audit.md +63 -59
  201. package/pipeline/skills/shared/external/skill-creator/checklist.md +28 -20
  202. package/pipeline/skills/shared/external/skill-creator/examples.md +40 -40
  203. package/pipeline/skills/shared/external/skill-creator/label-check.md +48 -36
  204. package/pipeline/skills/shared/external/skill-creator/scripts/audit-panel.js +91 -100
  205. package/pipeline/skills/shared/external/skill-creator/template.md +51 -39
  206. package/pipeline/skills/shared/external/speech-recognition/SKILL.md +217 -421
  207. package/pipeline/skills/shared/external/speech-recognition/evals/evals.json +23 -26
  208. package/pipeline/skills/shared/external/speech-recognition/references/speechanalyzer-patterns.md +133 -125
  209. package/pipeline/skills/shared/external/storekit/SKILL.md +228 -204
  210. package/pipeline/skills/shared/external/storekit/evals/evals.json +27 -24
  211. package/pipeline/skills/shared/external/storekit/references/app-review-guidelines.md +98 -109
  212. package/pipeline/skills/shared/external/storekit/references/core-patterns.md +298 -242
  213. package/pipeline/skills/shared/external/storekit/references/storekit-advanced.md +356 -649
  214. package/pipeline/skills/shared/external/swift-api-design-guidelines/SKILL.md +274 -399
  215. package/pipeline/skills/shared/external/swift-api-design-guidelines/evals/evals.json +22 -24
  216. package/pipeline/skills/shared/external/swift-api-design-guidelines/references/argument-labels-and-parameters.md +107 -108
  217. package/pipeline/skills/shared/external/swift-api-design-guidelines/references/conventions-and-special-rules.md +93 -165
  218. package/pipeline/skills/shared/external/swift-api-design-guidelines/references/naming-and-clarity.md +99 -137
  219. package/pipeline/skills/shared/external/swift-api-design-guidelines/references/side-effects-and-mutating-pairs.md +77 -120
  220. package/pipeline/skills/shared/external/swift-architecture/SKILL.md +334 -350
  221. package/pipeline/skills/shared/external/swift-architecture/evals/evals.json +22 -22
  222. package/pipeline/skills/shared/external/swift-charts/SKILL.md +208 -394
  223. package/pipeline/skills/shared/external/swift-charts/evals/evals.json +27 -30
  224. package/pipeline/skills/shared/external/swift-charts/references/charts-patterns.md +351 -762
  225. package/pipeline/skills/shared/external/swift-codable/SKILL.md +339 -343
  226. package/pipeline/skills/shared/external/swift-codable/evals/evals.json +20 -20
  227. package/pipeline/skills/shared/external/swift-concurrency/SKILL.md +303 -351
  228. package/pipeline/skills/shared/external/swift-concurrency/evals/evals.json +27 -24
  229. package/pipeline/skills/shared/external/swift-concurrency/references/approachable-concurrency.md +65 -80
  230. package/pipeline/skills/shared/external/swift-concurrency/references/async-algorithms.md +48 -84
  231. package/pipeline/skills/shared/external/swift-concurrency/references/bridging-interop.md +134 -79
  232. package/pipeline/skills/shared/external/swift-concurrency/references/concurrency-patterns.md +145 -167
  233. package/pipeline/skills/shared/external/swift-concurrency/references/diagnostics.md +62 -50
  234. package/pipeline/skills/shared/external/swift-concurrency/references/swiftui-concurrency.md +92 -121
  235. package/pipeline/skills/shared/external/swift-concurrency/references/synchronization-primitives.md +177 -241
  236. package/pipeline/skills/shared/external/swift-formatstyle/SKILL.md +258 -234
  237. package/pipeline/skills/shared/external/swift-language/SKILL.md +342 -382
  238. package/pipeline/skills/shared/external/swift-language/evals/evals.json +24 -27
  239. package/pipeline/skills/shared/external/swift-language/references/swift-attributes-interop.md +79 -56
  240. package/pipeline/skills/shared/external/swift-language/references/swift-patterns-extended.md +297 -340
  241. package/pipeline/skills/shared/external/swift-security/SKILL.md +180 -161
  242. package/pipeline/skills/shared/external/swift-security/evals/evals.json +25 -25
  243. package/pipeline/skills/shared/external/swift-security/references/biometric-authentication.md +314 -469
  244. package/pipeline/skills/shared/external/swift-security/references/certificate-trust.md +408 -476
  245. package/pipeline/skills/shared/external/swift-security/references/common-anti-patterns.md +260 -530
  246. package/pipeline/skills/shared/external/swift-security/references/compliance-owasp-mapping.md +270 -477
  247. package/pipeline/skills/shared/external/swift-security/references/credential-storage-patterns.md +573 -571
  248. package/pipeline/skills/shared/external/swift-security/references/cryptokit-public-key.md +370 -441
  249. package/pipeline/skills/shared/external/swift-security/references/cryptokit-symmetric.md +332 -433
  250. package/pipeline/skills/shared/external/swift-security/references/keychain-access-control.md +346 -468
  251. package/pipeline/skills/shared/external/swift-security/references/keychain-fundamentals.md +352 -472
  252. package/pipeline/skills/shared/external/swift-security/references/keychain-item-classes.md +431 -432
  253. package/pipeline/skills/shared/external/swift-security/references/keychain-sharing.md +328 -425
  254. package/pipeline/skills/shared/external/swift-security/references/migration-legacy-stores.md +341 -579
  255. package/pipeline/skills/shared/external/swift-security/references/secure-enclave.md +396 -457
  256. package/pipeline/skills/shared/external/swift-security/references/testing-security-code.md +354 -614
  257. package/pipeline/skills/shared/external/swift-testing/SKILL.md +188 -175
  258. package/pipeline/skills/shared/external/swift-testing/evals/evals.json +26 -24
  259. package/pipeline/skills/shared/external/swift-testing/references/testing-advanced.md +80 -84
  260. package/pipeline/skills/shared/external/swift-testing/references/testing-patterns.md +317 -433
  261. package/pipeline/skills/shared/external/swiftdata/SKILL.md +392 -256
  262. package/pipeline/skills/shared/external/swiftdata/evals/evals.json +24 -24
  263. package/pipeline/skills/shared/external/swiftdata/references/core-data-coexistence.md +206 -402
  264. package/pipeline/skills/shared/external/swiftdata/references/indexing.md +59 -52
  265. package/pipeline/skills/shared/external/swiftdata/references/predicate-pitfalls.md +57 -33
  266. package/pipeline/skills/shared/external/swiftdata/references/swiftdata-advanced.md +354 -747
  267. package/pipeline/skills/shared/external/swiftdata/references/swiftdata-queries.md +300 -508
  268. package/pipeline/skills/shared/external/swiftlint/SKILL.md +175 -226
  269. package/pipeline/skills/shared/external/swiftlint/references/adoption-and-configuration.md +141 -208
  270. package/pipeline/skills/shared/external/swiftlint/references/custom-rules-and-analyze.md +100 -109
  271. package/pipeline/skills/shared/external/swiftlint/references/plugins-run-scripts-and-integrations.md +159 -179
  272. package/pipeline/skills/shared/external/swiftlint/references/rule-reference.md +383 -18
  273. package/pipeline/skills/shared/external/swiftlint/references/rules-suppressions-and-baselines.md +143 -229
  274. package/pipeline/skills/shared/external/swiftui-animation/SKILL.md +283 -366
  275. package/pipeline/skills/shared/external/swiftui-animation/references/animation-advanced.md +396 -608
  276. package/pipeline/skills/shared/external/swiftui-animation/references/core-animation-bridge.md +336 -385
  277. package/pipeline/skills/shared/external/swiftui-gestures/SKILL.md +239 -349
  278. package/pipeline/skills/shared/external/swiftui-gestures/references/gesture-patterns.md +228 -310
  279. package/pipeline/skills/shared/external/swiftui-layout-components/SKILL.md +260 -249
  280. package/pipeline/skills/shared/external/swiftui-layout-components/references/form.md +92 -74
  281. package/pipeline/skills/shared/external/swiftui-layout-components/references/grids.md +112 -177
  282. package/pipeline/skills/shared/external/swiftui-layout-components/references/list.md +61 -64
  283. package/pipeline/skills/shared/external/swiftui-layout-components/references/scrollview.md +94 -134
  284. package/pipeline/skills/shared/external/swiftui-liquid-glass/SKILL.md +193 -225
  285. package/pipeline/skills/shared/external/swiftui-liquid-glass/references/liquid-glass.md +173 -327
  286. package/pipeline/skills/shared/external/swiftui-navigation/SKILL.md +193 -168
  287. package/pipeline/skills/shared/external/swiftui-navigation/references/deeplinks.md +127 -150
  288. package/pipeline/skills/shared/external/swiftui-navigation/references/navigationstack.md +132 -133
  289. package/pipeline/skills/shared/external/swiftui-navigation/references/sheets.md +152 -117
  290. package/pipeline/skills/shared/external/swiftui-navigation/references/tabview.md +106 -140
  291. package/pipeline/skills/shared/external/swiftui-patterns/SKILL.md +316 -252
  292. package/pipeline/skills/shared/external/swiftui-patterns/references/architecture-patterns.md +341 -332
  293. package/pipeline/skills/shared/external/swiftui-patterns/references/deprecated-migration.md +547 -854
  294. package/pipeline/skills/shared/external/swiftui-patterns/references/design-polish.md +485 -537
  295. package/pipeline/skills/shared/external/swiftui-patterns/references/platform-and-sharing.md +417 -499
  296. package/pipeline/skills/shared/external/swiftui-performance/SKILL.md +213 -376
  297. package/pipeline/skills/shared/external/swiftui-performance/references/demystify-swiftui-performance-wwdc23.md +86 -175
  298. package/pipeline/skills/shared/external/swiftui-performance/references/optimizing-swiftui-performance-instruments.md +89 -195
  299. package/pipeline/skills/shared/external/swiftui-performance/references/understanding-hangs-in-your-app.md +95 -182
  300. package/pipeline/skills/shared/external/swiftui-performance/references/understanding-improving-swiftui-performance.md +71 -149
  301. package/pipeline/skills/shared/external/swiftui-performance/references/wwdc-session-sources.md +21 -27
  302. package/pipeline/skills/shared/external/swiftui-uikit-interop/SKILL.md +303 -295
  303. package/pipeline/skills/shared/external/swiftui-uikit-interop/references/hosting-migration.md +204 -387
  304. package/pipeline/skills/shared/external/swiftui-uikit-interop/references/representable-recipes.md +469 -683
  305. package/pipeline/skills/shared/external/swiftui-webkit/SKILL.md +140 -186
  306. package/pipeline/skills/shared/external/swiftui-webkit/references/loading-and-observation.md +75 -86
  307. package/pipeline/skills/shared/external/swiftui-webkit/references/local-content-and-custom-schemes.md +63 -60
  308. package/pipeline/skills/shared/external/swiftui-webkit/references/migration-and-fallbacks.md +69 -137
  309. package/pipeline/skills/shared/external/swiftui-webkit/references/navigation-and-javascript.md +95 -67
  310. package/pipeline/skills/shared/external/tailwind-css/SKILL.md +1 -0
  311. package/pipeline/skills/shared/external/testing-backend/SKILL.md +1 -0
  312. package/pipeline/skills/shared/external/tipkit/SKILL.md +220 -335
  313. package/pipeline/skills/shared/external/tipkit/references/tipkit-patterns.md +356 -494
  314. package/pipeline/skills/shared/external/typescript-patterns/SKILL.md +1 -0
  315. package/pipeline/skills/shared/external/vision-framework/SKILL.md +260 -375
  316. package/pipeline/skills/shared/external/vision-framework/references/vision-requests.md +393 -515
  317. package/pipeline/skills/shared/external/vision-framework/references/visionkit-scanner.md +363 -539
  318. package/pipeline/skills/shared/external/vue-composition/SKILL.md +1 -0
  319. package/pipeline/skills/shared/external/weatherkit/SKILL.md +152 -310
  320. package/pipeline/skills/shared/external/weatherkit/references/weatherkit-patterns.md +288 -407
  321. package/pipeline/skills/shared/external/web-accessibility/SKILL.md +1 -0
  322. package/pipeline/skills/shared/external/web-performance/SKILL.md +1 -0
  323. package/pipeline/skills/shared/external/web-testing/SKILL.md +1 -0
  324. package/pipeline/skills/shared/external/widgetkit/SKILL.md +216 -288
  325. package/pipeline/skills/shared/external/widgetkit/references/widgetkit-advanced.md +414 -719
  326. package/pipeline/skills/shared/external/NOTICE-swift-ios-skills.md +0 -39
@@ -1,283 +1,198 @@
1
- # Rules, Suppressions, and Baselines
1
+ # Rules, Suppressions and Baselines
2
2
 
3
- Guidance on SwiftLint rule categories, inline suppression syntax, baseline workflows, and false-positive handling.
3
+ Back to [SKILL.md](../SKILL.md). Every identifier is indexed in the
4
+ [rule reference](rule-reference.md).
4
5
 
5
- ## Contents
6
+ ## The three kinds of rule
6
7
 
7
- - [Rule Categories](#rule-categories)
8
- - [Browsing Rules](#browsing-rules)
9
- - [Suppression Syntax](#suppression-syntax)
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
- - empty_count
17
+ - accessibility_label_for_image
18
+ - accessibility_trait_for_button
32
19
  - closure_spacing
33
- - force_unwrapping
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
- - accessibility_label_for_image
46
- - accessibility_trait_for_button
28
+ - vertical_whitespace_opening_braces
47
29
  ```
48
30
 
49
- ### Analyzer rules
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
- Require the Swift compiler's AST information. Must be run via `swiftlint analyze` with compiler logs. See the custom rules and analyze reference linked from SKILL.md.
35
+ ## Looking rules up
52
36
 
53
- ```yaml
54
- analyzer_rules:
55
- - unused_import
56
- - unused_declaration
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
- ## Browsing Rules
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
- List all rules and their status:
92
+ ### Analyzer rules
62
93
 
63
- ```sh
64
- swiftlint rules # all rules with enabled/disabled/correctable status
65
- swiftlint rules --enabled # only currently enabled rules
66
- swiftlint rules --disabled # only currently disabled rules
67
- swiftlint rules <rule_identifier> # detailed info for one rule
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
- The official [rule directory](https://realm.github.io/SwiftLint/rule-directory.html) provides descriptions, configuration options, and examples for every rule.
71
-
72
- Do not memorize or transcribe the rule directory. Look up specific rules when needed.
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
- # Threshold-based rules use warning/error:
140
- line_length:
107
+ line_length: # thresholds
141
108
  warning: 140
142
109
  error: 200
143
110
 
144
- # Boolean option rules:
145
- trailing_comma:
111
+ trailing_comma: # boolean option
146
112
  mandatory_comma: true
147
113
 
148
- # Rules with excluded identifiers:
149
- identifier_name:
150
- excluded:
151
- - id
152
- - x
153
- - y
114
+ identifier_name: # identifiers exempt from the rule
115
+ excluded: [id, x, y]
154
116
 
155
- # Rules with a single severity override:
156
- force_cast: error # shorthand for severity: error
117
+ force_cast: error # shorthand for severity: error
157
118
 
158
- # Deployment target rule:
159
- deployment_target:
119
+ deployment_target: # minimum versions already guaranteed
160
120
  iOS_deployment_target: "16.0"
161
121
  ```
162
122
 
163
- Run `swiftlint rules <rule_identifier>` to see all available configuration keys for any rule.
164
-
165
- ## Suppression Syntax
166
-
167
- ### Single-line suppressions
123
+ ## Suppression syntax
168
124
 
169
125
  ```swift
170
- // swiftlint:disable:next force_cast
171
- let view = object as! UIView
126
+ // swiftlint:disable:next force_unwrapping
127
+ let icon = iconsByKind[kind]! // next line
172
128
 
173
- let value = dict["key"]! // swiftlint:disable:this force_unwrapping
129
+ let port = Int(raw)! // swiftlint:disable:this force_unwrapping // same line
174
130
 
175
- // swiftlint:disable:previous large_tuple
131
+ let host = hosts[0]!
132
+ // swiftlint:disable:previous force_unwrapping // previous line
176
133
  ```
177
134
 
178
- - `:next` - suppresses on the next line
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 complexLegacyFunction() {
187
- // ... long function ...
139
+ func migrate(_ record: LegacyRecord) {
140
+ // many branches
188
141
  }
189
142
  // swiftlint:enable cyclomatic_complexity function_body_length
190
143
  ```
191
144
 
192
- Multiple rules can be listed in one directive, separated by spaces.
145
+ Leaving out `// swiftlint:enable all` after `// swiftlint:disable all` switches
146
+ the linter off for the remainder of the file.
193
147
 
194
- ### Disable all rules
195
-
196
- ```swift
197
- // swiftlint:disable all
198
- // ... entire block is unlinted ...
199
- // swiftlint:enable all
200
- ```
148
+ ## Suppression policy
201
149
 
202
- If you forget `// swiftlint:enable all`, the rest of the file is unlinted. This is a common mistake.
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
- ## Suppression Policy
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
- - **Target specific rules.** Never use `// swiftlint:disable all` unless the block is generated code that cannot be excluded via config.
207
- - **Add a reason.** Follow the suppression with a brief comment explaining why:
208
-
209
- ```swift
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
- Baselines record all existing violations so only new violations are reported.
222
-
223
- ### Creating a baseline
224
-
225
- ```sh
226
- swiftlint --write-baseline .swiftlint.baseline
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
- ## False Positives
175
+ ### Choosing a tool
268
176
 
269
- When SwiftLint flags code incorrectly:
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
- 1. **Check if it's a real false positive** by reading the rule description in the [rule directory](https://realm.github.io/SwiftLint/rule-directory.html).
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
- ## Generated Code and Test Targets
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
- ### Generated code
193
+ ## Generated code and tests
279
194
 
280
- Exclude generated code directories in `.swiftlint.yml`:
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
- This is preferable to inline `// swiftlint:disable all` markers because it keeps generated files completely out of the lint pass.
204
+ That is cleaner than a `disable all` at the top of each file.
290
205
 
291
- ### Test targets
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
- - force_unwrapping
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
- This is better than excluding tests entirely, because tests still benefit from formatting rules, naming conventions, and other applicable checks.
219
+ Tests still benefit from formatting, naming and the rest of the rules, which a
220
+ full exclusion would throw away.