Skip to content

Commit

Permalink
Update rules docs
Browse files Browse the repository at this point in the history
  • Loading branch information
marcelofabri committed Jul 18, 2017
1 parent 7ab0796 commit d823538
Showing 1 changed file with 47 additions and 0 deletions.
47 changes: 47 additions & 0 deletions Rules.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@
* [Trailing Whitespace](#trailing-whitespace)
* [Type Body Length](#type-body-length)
* [Type Name](#type-name)
* [Unneeded Parentheses in Closure Argument](#unneeded-parentheses-in-closure-argument)
* [Unused Closure Parameter](#unused-closure-parameter)
* [Unused Enumerated](#unused-enumerated)
* [Unused Optional Binding](#unused-optional-binding)
Expand Down Expand Up @@ -12136,6 +12137,52 @@ protocol Foo {



## Unneeded Parentheses in Closure Argument

Identifier | Enabled by default | Supports autocorrection | Kind
--- | --- | --- | ---
`unneeded_parentheses_in_closure_argument` | Enabled | Yes | style

Parentheses are not needed when declaring closure arguments.

### Examples

<details>
<summary>Non Triggering Examples</summary>

```swift
let foo = { (bar: Int) in }

```

```swift
let foo = { bar in }

```

```swift
let foo = { bar -> Bool in return true }

```

</details>
<details>
<summary>Triggering Examples</summary>

```swift
call(arg: { (bar) in })

```

```swift
let foo = { (bar) -> Bool in return true }

```

</details>



## Unused Closure Parameter

Identifier | Enabled by default | Supports autocorrection | Kind
Expand Down

0 comments on commit d823538

Please sign in to comment.