Enable SwiftLint rule 'function_default_parameter_at_end' and fix all violations
This commit is contained in:
parent
5270c92b76
commit
d3a11c9d29
3 changed files with 10 additions and 4 deletions
|
|
@ -67,7 +67,7 @@ whitelist_rules:
|
|||
# - force_try
|
||||
# - force_unwrapping
|
||||
# - function_body_length
|
||||
# - function_default_parameter_at_end
|
||||
- function_default_parameter_at_end
|
||||
# - function_parameter_count
|
||||
- generic_type_name
|
||||
- identical_operands
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -27,10 +27,10 @@ class PasswordStoreTest: XCTestCase {
|
|||
let expectation = self.expectation(description: "clone")
|
||||
try passwordStore.cloneRepository(
|
||||
remoteRepoURL: remoteRepoURL,
|
||||
options: cloneOptions,
|
||||
branchName: "master",
|
||||
transferProgressBlock: { _, _ in },
|
||||
checkoutProgressBlock: { _, _, _ in },
|
||||
options: cloneOptions,
|
||||
completion: { expectation.fulfill() }
|
||||
)
|
||||
waitForExpectations(timeout: 3, handler: nil)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue