realm / realm/SwiftLint

Spacing between brace and closure parameters

Open
#2,186 1 comment 3 reactions 0 assignees View on GitHub

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
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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.