From 4cd9df60c8003782e4ed49be3d94fc06005b2ee1 Mon Sep 17 00:00:00 2001 From: Marcelo Fabri Date: Wed, 19 Jul 2017 15:34:51 +0200 Subject: [PATCH] Make unneeded_parentheses_in_closure_argument opt-in --- .swiftlint.yml | 1 + CHANGELOG.md | 4 ++-- .../Rules/UnneededParenthesesInClosureArgumentRule.swift | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.swiftlint.yml b/.swiftlint.yml index 1811620d1b8..e850db17f19 100644 --- a/.swiftlint.yml +++ b/.swiftlint.yml @@ -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: | diff --git a/CHANGELOG.md b/CHANGELOG.md index 954e2b0d05d..89f122d368f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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) diff --git a/Source/SwiftLintFramework/Rules/UnneededParenthesesInClosureArgumentRule.swift b/Source/SwiftLintFramework/Rules/UnneededParenthesesInClosureArgumentRule.swift index 67acdfc6452..8c978a75066 100644 --- a/Source/SwiftLintFramework/Rules/UnneededParenthesesInClosureArgumentRule.swift +++ b/Source/SwiftLintFramework/Rules/UnneededParenthesesInClosureArgumentRule.swift @@ -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() {}