Enable SwiftLint rule 'unneeded_parentheses_in_closure_argument' and fix all violations

This commit is contained in:
Danny Moesch 2020-07-05 23:32:43 +02:00 committed by Mingshen Sun
parent 5cca2c30d8
commit ab80e5297e
8 changed files with 13 additions and 13 deletions

View file

@ -193,7 +193,7 @@ open class PasscodeLockViewController: UIViewController, UITextFieldDelegate {
func forgotPasscodeButtonPressedAction(_: UIButton) {
let alert = UIAlertController(title: "ResetPass".localize(), message: "ResetPassExplanation.".localize(), preferredStyle: UIAlertController.Style.alert)
alert.addAction(
UIAlertAction(title: "ErasePasswordStoreData".localize(), style: UIAlertAction.Style.destructive) { [unowned self] (_) -> Void in
UIAlertAction(title: "ErasePasswordStoreData".localize(), style: UIAlertAction.Style.destructive) { [unowned self] _ -> Void in
let myContext = LAContext()
var error: NSError?
// If the device passcode is not set, reset the app.

View file

@ -24,7 +24,7 @@ public struct GitCredential {
public func credentialProvider(requestCredentialPassword: @escaping (Credential, String?) -> String?) throws -> GTCredentialProvider {
var attempts = 0
return GTCredentialProvider { (_, _, _) -> (GTCredential?) in
return GTCredentialProvider { _, _, _ -> (GTCredential?) in
var credential: GTCredential?
switch self.credential {

View file

@ -270,7 +270,7 @@ public class PasswordStore {
do {
var q = try fm.contentsOfDirectory(atPath: storeURL.path)
.filter { !$0.hasPrefix(".") }
.map { (filename) -> PasswordEntity in
.map { filename -> PasswordEntity in
let passwordEntity = NSEntityDescription.insertNewObject(forEntityName: "PasswordEntity", into: context) as! PasswordEntity
if filename.hasSuffix(".gpg") {
passwordEntity.name = String(filename.prefix(upTo: filename.index(filename.endIndex, offsetBy: -4)))
@ -294,7 +294,7 @@ public class PasswordStore {
e.isDir = true
let files = try fm.contentsOfDirectory(atPath: filePath)
.filter { !$0.hasPrefix(".") }
.map { (filename) -> PasswordEntity in
.map { filename -> PasswordEntity in
let passwordEntity = NSEntityDescription.insertNewObject(forEntityName: "PasswordEntity", into: context) as! PasswordEntity
if filename.hasSuffix(".gpg") {
passwordEntity.name = String(filename.prefix(upTo: filename.index(filename.endIndex, offsetBy: -4)))