diff --git a/.swiftformat b/.swiftformat index 3ad0152..e64c22b 100644 --- a/.swiftformat +++ b/.swiftformat @@ -6,6 +6,7 @@ --exclude /Tuist # rules +--disable trailingCommas --enable blockComments --enable markTypes --enable noExplicitOwnership diff --git a/Projects/App/Sources/MockFetchChannelListUsecaseImpl.swift b/Projects/App/Sources/MockFetchChannelListUsecaseImpl.swift index b2dc9d6..5ff8751 100644 --- a/Projects/App/Sources/MockFetchChannelListUsecaseImpl.swift +++ b/Projects/App/Sources/MockFetchChannelListUsecaseImpl.swift @@ -52,10 +52,6 @@ final class MockChannelListFetcher { "가나다라마바사아자차카타파하".randomElement()! }) - let randomBool = Bool.random() - let image: Image = randomBool ? .ratio16x9 : .ratio4x3 - let fetchedImage = await image.fetch() - channels.append(ChannelEntity(id: UUID().uuidString, name: name)) } diff --git a/Projects/App/Sources/Splash/SplashGradientView.swift b/Projects/App/Sources/Splash/SplashGradientView.swift index 9cdf788..755275a 100644 --- a/Projects/App/Sources/Splash/SplashGradientView.swift +++ b/Projects/App/Sources/Splash/SplashGradientView.swift @@ -14,7 +14,7 @@ final class SplashGradientView: UIView { CGColor(red: 31 / 255, green: 52 / 255, blue: 55 / 255, alpha: 1)], [CGColor(red: 0 / 255, green: 0 / 255, blue: 0 / 255, alpha: 1), - CGColor(red: 31 / 255, green: 52 / 255, blue: 55 / 255, alpha: 1)], + CGColor(red: 31 / 255, green: 52 / 255, blue: 55 / 255, alpha: 1)] ] override init(frame: CGRect) { diff --git a/Projects/Domains/BaseDomain/Project.swift b/Projects/Domains/BaseDomain/Project.swift index 0db562a..a0bb5e8 100644 --- a/Projects/Domains/BaseDomain/Project.swift +++ b/Projects/Domains/BaseDomain/Project.swift @@ -8,14 +8,14 @@ let project = Project.module( .interface(module: .domain(.BaseDomain)), .implements(module: .domain(.BaseDomain), dependencies: [ .domain(target: .BaseDomain, type: .interface), - .module(target: .FastNetwork), + .module(target: .FastNetwork) ]), .testing(module: .domain(.BaseDomain), dependencies: [ - .domain(target: .BaseDomain, type: .interface), + .domain(target: .BaseDomain, type: .interface) ]), .tests(module: .domain(.BaseDomain), dependencies: [ .domain(target: .BaseDomain), - .domain(target: .BaseDomain, type: .testing), - ]), + .domain(target: .BaseDomain, type: .testing) + ]) ] ) diff --git a/Projects/Domains/BroadcastDomain/Project.swift b/Projects/Domains/BroadcastDomain/Project.swift index a59da38..c40b10b 100644 --- a/Projects/Domains/BroadcastDomain/Project.swift +++ b/Projects/Domains/BroadcastDomain/Project.swift @@ -8,14 +8,14 @@ let project = Project.module( .interface(module: .domain(.BroadcastDomain)), .implements(module: .domain(.BroadcastDomain), dependencies: [ .domain(target: .BroadcastDomain, type: .interface), - .domain(target: .BaseDomain), + .domain(target: .BaseDomain) ]), .testing(module: .domain(.BroadcastDomain), dependencies: [ - .domain(target: .BroadcastDomain, type: .interface), + .domain(target: .BroadcastDomain, type: .interface) ]), .tests(module: .domain(.BroadcastDomain), dependencies: [ .domain(target: .BroadcastDomain), - .domain(target: .BroadcastDomain, type: .testing), - ]), + .domain(target: .BroadcastDomain, type: .testing) + ]) ] ) diff --git a/Projects/Domains/BroadcastDomain/Sources/Endpoint/BroadcastEndpoint.swift b/Projects/Domains/BroadcastDomain/Sources/Endpoint/BroadcastEndpoint.swift index 1fdd05d..e1aef6c 100644 --- a/Projects/Domains/BroadcastDomain/Sources/Endpoint/BroadcastEndpoint.swift +++ b/Projects/Domains/BroadcastDomain/Sources/Endpoint/BroadcastEndpoint.swift @@ -24,7 +24,7 @@ extension BroadcastEndpoint: Endpoint { public var header: [String: String]? { [ - "Content-Type": "application/json", + "Content-Type": "application/json" ] } diff --git a/Projects/Domains/LiveStationDomain/Project.swift b/Projects/Domains/LiveStationDomain/Project.swift index e8c3c1e..f815334 100644 --- a/Projects/Domains/LiveStationDomain/Project.swift +++ b/Projects/Domains/LiveStationDomain/Project.swift @@ -8,10 +8,10 @@ let project = Project.module( .interface(module: .domain(.LiveStationDomain)), .implements(module: .domain(.LiveStationDomain), dependencies: [ .domain(target: .LiveStationDomain, type: .interface), - .domain(target: .BaseDomain), + .domain(target: .BaseDomain) ]), .testing(module: .domain(.LiveStationDomain), dependencies: [ - .domain(target: .LiveStationDomain, type: .interface), - ]), + .domain(target: .LiveStationDomain, type: .interface) + ]) ] ) diff --git a/Projects/Domains/LiveStationDomain/Sources/Endpoint/LiveStationEndpoint.swift b/Projects/Domains/LiveStationDomain/Sources/Endpoint/LiveStationEndpoint.swift index 9948e08..b74dd32 100644 --- a/Projects/Domains/LiveStationDomain/Sources/Endpoint/LiveStationEndpoint.swift +++ b/Projects/Domains/LiveStationDomain/Sources/Endpoint/LiveStationEndpoint.swift @@ -32,7 +32,7 @@ extension LiveStationEndpoint: Endpoint { "x-ncp-apigw-timestamp": timestamp, "x-ncp-iam-access-key": config(key: .accessKey), "x-ncp-apigw-signature-v2": makeSignature(with: timestamp), - "x-ncp-region_code": "KR", + "x-ncp-region_code": "KR" ] } @@ -75,16 +75,16 @@ extension LiveStationEndpoint: Endpoint { "cdnDomain": config(key: .cdnDomain), "profileId": config(key: .profileID), "cdnInstanceNo": config(key: .cdnInstanceNo), - "regionType": "KOREA", + "regionType": "KOREA" ], "qualitySetId": 4430, "useDvr": true, "immediateOnAir": true, "record": [ - "type": "MANUAL_UPLOAD", + "type": "MANUAL_UPLOAD" ], "drmEnabledYn": false, - "timemachineMin": 360, + "timemachineMin": 360 ] ) diff --git a/Projects/Features/AuthFeature/Project.swift b/Projects/Features/AuthFeature/Project.swift index 36b60a0..8c9e556 100644 --- a/Projects/Features/AuthFeature/Project.swift +++ b/Projects/Features/AuthFeature/Project.swift @@ -8,13 +8,13 @@ let project = Project.module( .interface(module: .feature(.AuthFeature)), .implements(module: .feature(.AuthFeature), dependencies: [ .feature(target: .AuthFeature, type: .interface), - .feature(target: .BaseFeature), + .feature(target: .BaseFeature) ]), .tests(module: .feature(.AuthFeature), dependencies: [ - .feature(target: .AuthFeature), + .feature(target: .AuthFeature) ]), .demo(module: .feature(.AuthFeature), dependencies: [ - .feature(target: .AuthFeature), - ]), + .feature(target: .AuthFeature) + ]) ] ) diff --git a/Projects/Features/AuthFeature/Sources/SignUpGradientView.swift b/Projects/Features/AuthFeature/Sources/SignUpGradientView.swift index 6824124..e8319d4 100644 --- a/Projects/Features/AuthFeature/Sources/SignUpGradientView.swift +++ b/Projects/Features/AuthFeature/Sources/SignUpGradientView.swift @@ -14,7 +14,7 @@ final class SignUpGradientView: UIView { CGColor(red: 31 / 255, green: 52 / 255, blue: 55 / 255, alpha: 1)], [CGColor(red: 0 / 255, green: 0 / 255, blue: 0 / 255, alpha: 1), - CGColor(red: 31 / 255, green: 52 / 255, blue: 55 / 255, alpha: 1)], + CGColor(red: 31 / 255, green: 52 / 255, blue: 55 / 255, alpha: 1)] ] override init(frame: CGRect) { diff --git a/Projects/Features/BaseFeature/Project.swift b/Projects/Features/BaseFeature/Project.swift index 9e3ad24..0ffc50c 100644 --- a/Projects/Features/BaseFeature/Project.swift +++ b/Projects/Features/BaseFeature/Project.swift @@ -9,18 +9,18 @@ let project = Project.module( .implements(module: .feature(.BaseFeature), dependencies: [ .feature(target: .BaseFeature, type: .interface), .userInterface(target: .DesignSystem), - .module(target: .ThirdPartyLibModule), + .module(target: .ThirdPartyLibModule) ]), .testing(module: .feature(.BaseFeature), dependencies: [ - .feature(target: .BaseFeature, type: .interface), + .feature(target: .BaseFeature, type: .interface) ]), .tests(module: .feature(.BaseFeature), dependencies: [ .feature(target: .BaseFeature), - .feature(target: .BaseFeature, type: .testing), + .feature(target: .BaseFeature, type: .testing) ]), .demo(module: .feature(.BaseFeature), dependencies: [ .feature(target: .BaseFeature), - .feature(target: .BaseFeature, type: .testing), - ]), + .feature(target: .BaseFeature, type: .testing) + ]) ] ) diff --git a/Projects/Features/LiveStreamFeature/Project.swift b/Projects/Features/LiveStreamFeature/Project.swift index 80d9137..c25e2bd 100644 --- a/Projects/Features/LiveStreamFeature/Project.swift +++ b/Projects/Features/LiveStreamFeature/Project.swift @@ -6,21 +6,21 @@ let project = Project.module( name: ModulePaths.Feature.LiveStreamFeature.rawValue, targets: [ .interface(module: .feature(.LiveStreamFeature), dependencies: [ - .feature(target: .BaseFeature, type: .interface), + .feature(target: .BaseFeature, type: .interface) ]), .implements(module: .feature(.LiveStreamFeature), dependencies: [ .feature(target: .LiveStreamFeature, type: .interface), .feature(target: .BaseFeature), .domain(target: .LiveStationDomain, type: .interface), .domain(target: .BroadcastDomain, type: .interface), - .module(target: .ChatSoketModule), + .module(target: .ChatSoketModule) ]), .tests(module: .feature(.LiveStreamFeature), dependencies: [ - .feature(target: .LiveStreamFeature), + .feature(target: .LiveStreamFeature) ]), .demo(module: .feature(.LiveStreamFeature), dependencies: [ .feature(target: .LiveStreamFeature), - .domain(target: .LiveStationDomain, type: .interface), - ]), + .domain(target: .LiveStationDomain, type: .interface) + ]) ] ) diff --git a/Projects/Features/LiveStreamFeature/Sources/Chating/Views/ChattingListView.swift b/Projects/Features/LiveStreamFeature/Sources/Chating/Views/ChattingListView.swift index 40afe0c..e1fbfc7 100644 --- a/Projects/Features/LiveStreamFeature/Sources/Chating/Views/ChattingListView.swift +++ b/Projects/Features/LiveStreamFeature/Sources/Chating/Views/ChattingListView.swift @@ -108,11 +108,11 @@ final class ChattingListView: BaseView { recentChatButton.translatesAutoresizingMaskIntoConstraints = false recentChatButtonShowConstraints = [ recentChatButton.centerXAnchor.constraint(equalTo: centerXAnchor), - recentChatButton.bottomAnchor.constraint(equalTo: chatInputField.topAnchor, constant: -8), + recentChatButton.bottomAnchor.constraint(equalTo: chatInputField.topAnchor, constant: -8) ] recentChatButtonHideConstraints = [ recentChatButton.centerXAnchor.constraint(equalTo: centerXAnchor), - recentChatButton.bottomAnchor.constraint(equalTo: chatInputField.bottomAnchor, constant: 0), + recentChatButton.bottomAnchor.constraint(equalTo: chatInputField.bottomAnchor, constant: 0) ] NSLayoutConstraint.activate(recentChatButtonHideConstraints) } diff --git a/Projects/Features/LiveStreamFeature/Sources/Player/ViewControllers/LiveStreamViewController.swift b/Projects/Features/LiveStreamFeature/Sources/Player/ViewControllers/LiveStreamViewController.swift index 4e21481..ef01fd5 100644 --- a/Projects/Features/LiveStreamFeature/Sources/Player/ViewControllers/LiveStreamViewController.swift +++ b/Projects/Features/LiveStreamFeature/Sources/Player/ViewControllers/LiveStreamViewController.swift @@ -106,7 +106,7 @@ public final class LiveStreamViewController: BaseViewController