Skip to content

Commit 270459b

Browse files
DTPOMERSER-1389 Update OS to runner mac-15, install swiftlinter and address lint issues
1 parent 5797a4e commit 270459b

14 files changed

+30
-19
lines changed

.github/workflows/ci.yml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,16 +15,16 @@ jobs:
1515
fail-fast: false
1616
matrix:
1717
include:
18-
- os: macos-12
18+
- os: macos-15
1919
task_title: 'Unit Tests'
2020
fastlane_task: 'unit_tests'
21-
xcode_version: 14.2
21+
xcode_version: 16.2
2222
code_coverage: true
2323

24-
- os: macos-12
24+
- os: macos-15
2525
task_title: 'UI Tests'
2626
fastlane_task: 'ui_tests'
27-
xcode_version: 13.4
27+
xcode_version: 16.4
2828
code_coverage: false
2929
runs-on: ${{ matrix.os }}
3030
steps:
@@ -53,6 +53,10 @@ jobs:
5353
- name: Run ${{ matrix.task_title }}
5454
run: fastlane ${{ matrix.fastlane_task }}
5555

56+
- name: Install Lint
57+
run:
58+
brew install swiftlint
59+
5660
- name: Lint validation
5761
if: matrix.code_coverage
5862
run:

Common/Sources/Insights/HyperwalletInsights.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ public class HyperwalletInsights: HyperwalletInsightsProtocol {
139139
}
140140
}
141141

142-
private func loadConfigurationAndInitializeInsights(completion: @escaping(Bool) -> Void) {
142+
private func loadConfigurationAndInitializeInsights(completion: @escaping (Bool) -> Void) {
143143
loadConfiguration { configuration in
144144
if let configuration = configuration {
145145
self.initializeInsights(configuration: configuration)
@@ -150,7 +150,7 @@ public class HyperwalletInsights: HyperwalletInsightsProtocol {
150150
}
151151
}
152152

153-
private func loadConfiguration(completion: @escaping(Configuration?) -> Void) {
153+
private func loadConfiguration(completion: @escaping (Configuration?) -> Void) {
154154
// Fetch configuration again
155155
Hyperwallet.shared.getConfiguration { configuration, _ in
156156
if let configuration = configuration {

Common/Tests/Helper/AuthenticationProviderMock.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ class AuthenticationProviderMock: HyperwalletAuthenticationTokenProvider {
1919
error = nil
2020
}
2121

22-
func retrieveAuthenticationToken(completionHandler authenticationTokenHandler: @escaping
22+
func retrieveAuthenticationToken(completionHandler authenticationTokenHandler: @escaping
2323
AuthenticationProviderMock.CompletionHandler) {
2424
hasRequestedClientToken = true
2525
authenticationTokenHandler(authorizationData, error)

Demo/IntegratorAuthenticationProvider.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ public class IntegratorAuthenticationProvider: HyperwalletAuthenticationTokenPro
3030
self.session = IntegratorAuthenticationProvider.createUrlSession(username: user, password: password)
3131
}
3232

33-
public func retrieveAuthenticationToken(completionHandler: @escaping
33+
public func retrieveAuthenticationToken(completionHandler: @escaping
3434
HyperwalletAuthenticationTokenProvider.CompletionHandler) {
3535
var request = URLRequest(url: URL(string: url)!)
3636
request.httpMethod = "POST"

Transfer/Sources/ListTransferDestinationController.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ extension ListTransferDestinationController {
179179
extension ListTransferDestinationController {
180180
/// The callback to refresh create transfer
181181
override public func didFlowComplete(with response: Any) {
182-
if response as? HyperwalletTransferMethod != nil {
182+
if response is HyperwalletTransferMethod {
183183
navigationController?.popViewController(animated: false)
184184
flowDelegate?.didFlowComplete(with: response)
185185
}

Transfer/Sources/ListTransferSourceController.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ extension ListTransferSourceController {
104104
extension ListTransferSourceController {
105105
/// The callback to refresh create transfer
106106
override public func didFlowComplete(with response: Any) {
107-
if response as? HyperwalletTransferMethod != nil {
107+
if response is HyperwalletTransferMethod {
108108
navigationController?.popViewController(animated: false)
109109
flowDelegate?.didFlowComplete(with: response)
110110
}

Transfer/Sources/ScheduleTransferSectionData.swift

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,12 +39,16 @@ extension ScheduleTransferSectionData {
3939
switch scheduleTransferSectionHeader.rawValue {
4040
case "source":
4141
return "mobileTransferFromLabel".localized()
42+
4243
case "destination":
4344
return "mobileTransferToLabel".localized()
45+
4446
case "notes":
4547
return "mobileNoteLabel".localized()
48+
4649
case "summary":
4750
return "mobileSummaryLabel".localized()
51+
4852
case "foreignExchange":
4953
return "mobileFXlabel".localized()
5054

TransferMethod/Sources/AddTransferMethodSectionData.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,10 @@ final class AddTransferMethodSectionData {
3535
return String(format: format,
3636
Locale.current.localizedString(forRegionCode: country ?? "") ?? "",
3737
currency ?? "").uppercased()
38+
3839
case "CREATE_BUTTON":
3940
return nil
41+
4042
case "INFORMATION":
4143
return "mobileFeesAndProcessingTime".localized()
4244

TransferMethod/Sources/ListTransferMethodController.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ extension ListTransferMethodController: ListTransferMethodView {
233233
extension ListTransferMethodController {
234234
/// The callback to refresh transfer method list
235235
override public func didFlowComplete(with response: Any) {
236-
if response as? HyperwalletTransferMethod != nil {
236+
if response is HyperwalletTransferMethod {
237237
coordinator?.navigateBackFromNextPage(with: response)
238238
// refresh transfer method list
239239
presenter.listTransferMethods()

TransferMethod/Sources/ListTransferMethodPresenter.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ final class ListTransferMethodPresenter {
4040
private weak var view: ListTransferMethodView?
4141
private let pageGroup = "transfer-method"
4242
private let pageName = "transfer-method:add:list-transfer-method"
43-
private (set) var sectionData = [HyperwalletTransferMethod]()
43+
private(set) var sectionData = [HyperwalletTransferMethod]()
4444
private lazy var transferMethodRepository = {
4545
TransferMethodRepositoryFactory.shared.transferMethodRepository()
4646
}()

0 commit comments

Comments
 (0)