Rules Hub
Coding Rules Library
← Back to all rules
Rule priority, scope & exceptions
Use this to align rules with the senior-level structure (P0/P1/P2, scope, exceptions/tradeoffs).
mobile ruleP2stack specificStack: swift
swiftclosuresreadabilityswiftlint
Don't use trailing-closure syntax when passing more than one closure
With multiple closure arguments, label them all explicitly instead of trailing the last one, so it's clear which closure is which.
PR: mobile-mining-2026-06Created: Jul 5, 2026
Bad example
Old codeswift
| 1 | animate(duration: 0.3, animations: { ... }) { done in ... } |
Explanation (EN)
Objašnjenje (HR)
Good example
New codeswift
| 1 | animate(duration: 0.3, animations: { ... }, completion: { done in ... }) |
Explanation (EN)
Objašnjenje (HR)