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_try
|
||||||
# - force_unwrapping
|
# - force_unwrapping
|
||||||
# - function_body_length
|
# - function_body_length
|
||||||
# - function_default_parameter_at_end
|
- function_default_parameter_at_end
|
||||||
# - function_parameter_count
|
# - function_parameter_count
|
||||||
- generic_type_name
|
- generic_type_name
|
||||||
- identical_operands
|
- identical_operands
|
||||||
|
|
|
||||||
|
|
@ -182,7 +182,13 @@ public class PasswordStore {
|
||||||
do {
|
do {
|
||||||
let credentialProvider = try credential.credentialProvider(requestCredentialPassword: requestCredentialPassword)
|
let credentialProvider = try credential.credentialProvider(requestCredentialPassword: requestCredentialPassword)
|
||||||
let options = [GTRepositoryCloneOptionsCredentialProvider: credentialProvider]
|
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 {
|
} catch {
|
||||||
credential.delete()
|
credential.delete()
|
||||||
throw (error)
|
throw (error)
|
||||||
|
|
@ -191,10 +197,10 @@ public class PasswordStore {
|
||||||
|
|
||||||
public func cloneRepository(
|
public func cloneRepository(
|
||||||
remoteRepoURL: URL,
|
remoteRepoURL: URL,
|
||||||
options: [AnyHashable: Any]? = nil,
|
|
||||||
branchName: String,
|
branchName: String,
|
||||||
transferProgressBlock: @escaping (UnsafePointer<git_transfer_progress>, UnsafeMutablePointer<ObjCBool>) -> Void,
|
transferProgressBlock: @escaping (UnsafePointer<git_transfer_progress>, UnsafeMutablePointer<ObjCBool>) -> Void,
|
||||||
checkoutProgressBlock: @escaping (String, UInt, UInt) -> Void,
|
checkoutProgressBlock: @escaping (String, UInt, UInt) -> Void,
|
||||||
|
options: [AnyHashable: Any]? = nil,
|
||||||
completion: @escaping () -> Void = {}
|
completion: @escaping () -> Void = {}
|
||||||
) throws {
|
) throws {
|
||||||
try? fm.removeItem(at: storeURL)
|
try? fm.removeItem(at: storeURL)
|
||||||
|
|
|
||||||
|
|
@ -27,10 +27,10 @@ class PasswordStoreTest: XCTestCase {
|
||||||
let expectation = self.expectation(description: "clone")
|
let expectation = self.expectation(description: "clone")
|
||||||
try passwordStore.cloneRepository(
|
try passwordStore.cloneRepository(
|
||||||
remoteRepoURL: remoteRepoURL,
|
remoteRepoURL: remoteRepoURL,
|
||||||
options: cloneOptions,
|
|
||||||
branchName: "master",
|
branchName: "master",
|
||||||
transferProgressBlock: { _, _ in },
|
transferProgressBlock: { _, _ in },
|
||||||
checkoutProgressBlock: { _, _, _ in },
|
checkoutProgressBlock: { _, _, _ in },
|
||||||
|
options: cloneOptions,
|
||||||
completion: { expectation.fulfill() }
|
completion: { expectation.fulfill() }
|
||||||
)
|
)
|
||||||
waitForExpectations(timeout: 3, handler: nil)
|
waitForExpectations(timeout: 3, handler: nil)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue