Skip to content

Commit

Permalink
Make unneeded_parentheses_in_closure_argument opt-in
Browse files Browse the repository at this point in the history
  • Loading branch information
marcelofabri committed Jul 19, 2017
1 parent 2eb73a9 commit 57f52b6
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions .swiftlint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ opt_in_rules:
- fatal_error_message
- vertical_parameter_alignment_on_call
- let_var_whitespace
- unneeded_parentheses_in_closure_argument

file_header:
required_pattern: |
Expand Down
4 changes: 2 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@
[Marcelo Fabri](https://github.com/marcelofabri)
[#1647](https://github.com/realm/SwiftLint/issues/1647)

* Add `unneeded_parentheses_in_closure_argument` correctable rule that warns
against using parentheses around argument declarations in closures.
* Add `unneeded_parentheses_in_closure_argument` opt-in correctable rule that
warns against using parentheses around argument declarations in closures.
[Marcelo Fabri](https://github.com/marcelofabri)
[#1483](https://github.com/realm/SwiftLint/issues/1483)

Expand Down
2 changes: 1 addition & 1 deletion Rules.md
Original file line number Diff line number Diff line change
Expand Up @@ -12141,7 +12141,7 @@ protocol Foo {

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

Parentheses are not needed when declaring closure arguments.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import Foundation
import Foundation
import SourceKittenFramework

public struct UnneededParenthesesInClosureArgumentRule: ConfigurationProviderRule, CorrectableRule {
public struct UnneededParenthesesInClosureArgumentRule: ConfigurationProviderRule, CorrectableRule, OptInRule {
public var configuration = SeverityConfiguration(.warning)

public init() {}
Expand Down

0 comments on commit 57f52b6

Please sign in to comment.