Enable SwiftLint rule 'multiline_arguments_brackets' and fix all violations

This commit is contained in:
Danny Moesch 2020-07-05 00:16:22 +02:00 committed by Mingshen Sun
parent b4c25726a5
commit c87f4e9792
18 changed files with 286 additions and 220 deletions

View file

@ -31,14 +31,18 @@ public func requestGitCredentialPassword(credential: GitCredential.Credential,
$0.text = lastPassword ?? ""
$0.isSecureTextEntry = true
}
alert.addAction(UIAlertAction.ok { _ in
password = alert.textFields?.first?.text
sem.signal()
})
alert.addAction(UIAlertAction.cancel { _ in
password = nil
sem.signal()
})
alert.addAction(
UIAlertAction.ok { _ in
password = alert.textFields?.first?.text
sem.signal()
}
)
alert.addAction(
UIAlertAction.cancel { _ in
password = nil
sem.signal()
}
)
controller.present(alert, animated: true)
}

View file

@ -29,11 +29,11 @@ public class SecurePasteboard {
backgroundTaskID = UIBackgroundTaskIdentifier.invalid
}
backgroundTaskID = UIApplication.shared.beginBackgroundTask(expirationHandler: { [weak self] in
backgroundTaskID = UIApplication.shared.beginBackgroundTask { [weak self] in
UIPasteboard.general.string = ""
UIApplication.shared.endBackgroundTask(UIBackgroundTaskIdentifier.invalid)
self?.backgroundTaskID = UIBackgroundTaskIdentifier.invalid
})
}
DispatchQueue.global(qos: .utility).asyncAfter(deadline: .now() + expirationTime) { [weak self] in
UIPasteboard.general.string = ""