Enable SwiftLint rule 'function_default_parameter_at_end' and fix all violations

This commit is contained in:
Danny Moesch 2020-07-06 10:09:52 +02:00 committed by Mingshen Sun
parent 5270c92b76
commit d3a11c9d29
3 changed files with 10 additions and 4 deletions

View file

@ -182,7 +182,13 @@ public class PasswordStore {
do {
let credentialProvider = try credential.credentialProvider(requestCredentialPassword: requestCredentialPassword)
let options = [GTRepositoryCloneOptionsCredentialProvider: credentialProvider]
try cloneRepository(remoteRepoURL: remoteRepoURL, options: options, branchName: branchName, transferProgressBlock: transferProgressBlock, checkoutProgressBlock: checkoutProgressBlock)
try cloneRepository(
remoteRepoURL: remoteRepoURL,
branchName: branchName,
transferProgressBlock: transferProgressBlock,
checkoutProgressBlock: checkoutProgressBlock,
options: options
)
} catch {
credential.delete()
throw (error)
@ -191,10 +197,10 @@ public class PasswordStore {
public func cloneRepository(
remoteRepoURL: URL,
options: [AnyHashable: Any]? = nil,
branchName: String,
transferProgressBlock: @escaping (UnsafePointer<git_transfer_progress>, UnsafeMutablePointer<ObjCBool>) -> Void,
checkoutProgressBlock: @escaping (String, UInt, UInt) -> Void,
options: [AnyHashable: Any]? = nil,
completion: @escaping () -> Void = {}
) throws {
try? fm.removeItem(at: storeURL)