Spacing between brace and closure parameters
Open
Nobody has claimed this yet.
rule-request
- Dominant language
- Swift
- Stars
- 19.7k
- Forks
- 2.3k
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 11
Description
New Issue Checklist
- [ ✔️] Updated SwiftLint to the latest version
- [ ✔️] I searched for existing GitHub issues
Rule Request
Rule to check spacing between opening brace of closure and following parameters and parameters and 'in' keyword. Maybe it can be added to closure_parameter_position rule.
Environment
-
SwiftLint version 0.25.1
-
CocoaPods
-
Xcode version 9.3
// This doesn't triggers a violation:
let test: (Bool) -> Void = { obj in
}
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading the existing closure_parameter_position rule and its related tests. Define the expected spacing around the opening closure brace, parameters, and the 'in' keyword; done means the shown example produces a violation while correctly spaced closures pass.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- swift
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100