Skip to content

Commit

Permalink
DTSERWONE-821 Address swift lint v0.50 violations (#138)
Browse files Browse the repository at this point in the history
* DTSERWONE-821 Address swiftling v0.50 violations
  • Loading branch information
grmeyer-hw-dev authored Mar 29, 2023
1 parent f68bef7 commit 2deb663
Show file tree
Hide file tree
Showing 18 changed files with 18 additions and 34 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
matrix:
include:
- os: macos-12
xcode_version: 13.4
xcode_version: 14.2
fastlane_task: unit_tests

runs-on: ${{ matrix.os }}
Expand Down
2 changes: 1 addition & 1 deletion Cartfile.resolved
Original file line number Diff line number Diff line change
@@ -1 +1 @@
github "JanGorman/Hippolyte" "0.6.0"
github "JanGorman/Hippolyte" "1.4.1"
2 changes: 1 addition & 1 deletion HyperwalletSDK.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |spec|
spec.name = 'HyperwalletSDK'
spec.version = '1.0.0-beta17'
spec.version = '1.0.0-beta18'
spec.summary = 'Hyperwallet Core SDK for iOS to integrate with Hyperwallet Platform'
spec.homepage = 'https://github.com/hyperwallet/hyperwallet-ios-sdk'
spec.license = { :type => 'MIT', :file => 'LICENSE' }
Expand Down
22 changes: 0 additions & 22 deletions HyperwalletSDK.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -728,7 +728,6 @@
98101DB62238A2F000BA04CA /* Sources */,
98101DB72238A2F000BA04CA /* Frameworks */,
98101DB82238A2F000BA04CA /* Resources */,
DBCA37C3225E52DA00CD4137 /* Swiftlint */,
);
buildRules = (
);
Expand Down Expand Up @@ -878,27 +877,6 @@
};
/* End PBXResourcesBuildPhase section */

/* Begin PBXShellScriptBuildPhase section */
DBCA37C3225E52DA00CD4137 /* Swiftlint */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
);
inputPaths = (
);
name = Swiftlint;
outputFileListPaths = (
);
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "set -e\nset -x\n\nif ! which swiftlint > /dev/null; then\necho \"warning: SwiftLint is not installed. To install run `brew install SwiftLint`\"\nelse\n swiftlint --fix\n swiftlint\nfi\n";
};
/* End PBXShellScriptBuildPhase section */

/* Begin PBXSourcesBuildPhase section */
98101DB62238A2F000BA04CA /* Sources */ = {
isa = PBXSourcesBuildPhase;
Expand Down
3 changes: 2 additions & 1 deletion Sources/HyperwalletAuthenticationTokenProvider.swift
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ import Foundation
/// to authenticate the User to the Hyperwallet platform.
///
/// Implementations of `HyperwalletAuthenticationTokenProvider` are expected to be non-blocking and thread safe.
@objc public protocol HyperwalletAuthenticationTokenProvider {
@objc
public protocol HyperwalletAuthenticationTokenProvider {
/// A callback interface to handle the submission of an authentication token or an error message in case of failure.
///
/// The authentication token is a JSON web token that contains as part of its claim set the principal that will
Expand Down
1 change: 1 addition & 0 deletions Tests/AnyCodableTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -83,3 +83,4 @@ class AnyCodableTests: XCTestCase {
XCTAssertNotNil(result[4].value as! String, "") // null
}
}
// swiftlint:enable force_cast force_try
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import Hippolyte
@testable import HyperwalletSDK
import XCTest

// swiftlint:disable multiline_arguments
// swiftlint:disable multiline_arguments function_body_length
class HyperwalletTransferMethodConfigurationTests: XCTestCase {
override func setUp() {
Hyperwallet.setup(HyperwalletTestHelper.authenticationProvider)
Expand All @@ -14,7 +14,6 @@ class HyperwalletTransferMethodConfigurationTests: XCTestCase {
}
}

// swiftlint:disable function_body_length
func testRetrieveTransferMethodConfigurationKeys_success() {
// Given
let request = setUpTransferMethodConfigurationRequest("TransferMethodConfigurationKeysResponse")
Expand Down Expand Up @@ -219,3 +218,4 @@ class HyperwalletTransferMethodConfigurationTests: XCTestCase {
error: error))
}
}
// swiftlint:enable multiline_arguments function_body_length
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import Hippolyte
@testable import HyperwalletSDK
import XCTest

// swiftlint:disable function_body_length
class HyperwalletTransferMethodUpdateConfigurationTests: XCTestCase {
override func setUp() {
Hyperwallet.setup(HyperwalletTestHelper.authenticationProvider)
Expand All @@ -31,7 +32,6 @@ class HyperwalletTransferMethodUpdateConfigurationTests: XCTestCase {
}
}

// swiftlint:disable function_body_length
func testRetrieveTransferMethodUpdateConfigurationFields_bankAccount() {
// Given
let request = setUpTransferMethodUpdateConfigurationRequest("TransferMethodUpdateConfigurationFieldsResponse")
Expand Down Expand Up @@ -279,3 +279,4 @@ class HyperwalletTransferMethodUpdateConfigurationTests: XCTestCase {
error: error))
}
}
// swiftlint:enable function_body_length
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,4 @@ class HyperwalletTransferMethodConfigurationFeeAndProcessingTimeQueryTests: XCTe
XCTAssertNotEqual(usUsdFieldQuery.hashValue, usCadQuery.hashValue)
}
}
// swiftlint:enable type_name
Original file line number Diff line number Diff line change
Expand Up @@ -103,3 +103,4 @@ class TransferMethodConfigurationFieldResultTests: XCTestCase {
return graphQlResult.data
}
}
// swiftlint:enable force_try
Original file line number Diff line number Diff line change
Expand Up @@ -86,3 +86,4 @@ class TransferMethodConfigurationKeyResultTests: XCTestCase {
return graphQlResult.data
}
}
// swiftlint:enable force_try
1 change: 0 additions & 1 deletion Tests/HTTPTransactionTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ class HTTPTransactionTests: XCTestCase {
XCTAssertNotNil(configuration.authorization, "The authorization has not been initialized")
}

// swiftlint:disable function_body_length
func testPerformRest_successURLRequest() {
// Given
let queryParam = HyperwalletBankAccountQueryParam()
Expand Down
3 changes: 2 additions & 1 deletion Tests/Receipt/HyperwalletReceiptTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import Hippolyte
@testable import HyperwalletSDK
import XCTest

// swiftlint:disable function_body_length
class HyperwalletReceiptTests: XCTestCase {
override func setUp() {
Hyperwallet.setup(HyperwalletTestHelper.authenticationProvider)
Expand All @@ -13,7 +14,6 @@ class HyperwalletReceiptTests: XCTestCase {
}
}

// swiftlint:disable function_body_length
func testListUserReceipts_success() {
// Given
let expectation = self.expectation(description: "List User Receipts completed")
Expand Down Expand Up @@ -153,3 +153,4 @@ class HyperwalletReceiptTests: XCTestCase {
}
}
}
// swiftlint:enable function_body_length
1 change: 1 addition & 0 deletions Tests/TransactionTypeTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ class TransactionTypeTests: XCTestCase {
"INVALID_URL")
}
}
// swiftlint:enable force_cast

private func assertCreateRestRequestSucceeded(transactionType: TransactionType,
httpMethod: HTTPMethod,
Expand Down
1 change: 0 additions & 1 deletion Tests/TransferMethod/HyperwalletPrepaidCardTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ class HyperwalletPrepaidCardTests: XCTestCase {
XCTAssertEqual(prepaidCardResponse?.type, HyperwalletTransferMethod.TransferMethodType.prepaidCard.rawValue)
}

// swiftlint:disable function_body_length
func testListPrepaidCards_success() {
// Given
let expectation = self.expectation(description: "List prepaid cards completed")
Expand Down
1 change: 1 addition & 0 deletions Tests/TransferMethod/HyperwalletTransferMethodTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -121,3 +121,4 @@ class HyperwalletTransferMethodTests: XCTestCase {
XCTAssertNil(transferMethods, "The `transferMethods` should be nil")
}
}
// swiftlint:enable function_body_length
1 change: 0 additions & 1 deletion Tests/User/HyperwalletUserTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ class HyperwalletUserTests: XCTestCase {
}
}

// swiftlint:disable function_body_length
func testGetUser_individualSuccess() {
// Given
let expectation = self.expectation(description: "Get HyperwalletUser completed")
Expand Down
2 changes: 1 addition & 1 deletion fastlane/Fastfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ end
lane :unit_tests do
run_tests(
project: "HyperwalletSDK.xcodeproj",
devices: ['iPhone 13 Pro'],
devices: ['iPhone 14 Pro'],
derived_data_path: './output',
scheme: "HyperwalletSDK",
configuration: 'Debug',
Expand Down

0 comments on commit 2deb663

Please sign in to comment.