Skip to content

Commit 4a26636

Browse files
authored
Merge pull request #69 from 87kangsw/release/2.1.3
[Release] 2.1.3
2 parents 1b1e2e2 + 408bca3 commit 4a26636

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+176
-260
lines changed

.swiftlint.yml

Lines changed: 14 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -1,58 +1,26 @@
11
disabled_rules: # rule identifiers to exclude from running
2-
- trailing_whitespace
3-
- line_length
4-
- identifier_name
5-
- function_body_length
6-
- cyclomatic_complexity
7-
- switch_case_alignment
2+
- trailing_whitespace
3+
- line_length
4+
- identifier_name
5+
- function_body_length
6+
- cyclomatic_complexity
7+
- switch_case_alignment
8+
- type_name
9+
- function_parameter_count
10+
- type_body_length
811
opt_in_rules: # some rules are only opt-in
9-
- empty_count
12+
- empty_count
1013
# Find all the available rules by running:
1114
# swiftlint rules
1215
included: # paths to include during linting. `--path` is ignored if present.
13-
- GitTime
16+
- GitTime
1417
excluded: # paths to ignore during linting. Takes precedence over `included`.
15-
- Carthage
16-
- Pods
18+
- Carthage
19+
- Pods
1720

1821
analyzer_rules: # Rules run by `swiftlint analyze` (experimental)
19-
- explicit_self
22+
- explicit_self
2023

2124
# configurable rules can be customized from this configuration file
2225
# binary rules can set their severity level
2326
force_cast: warning # implicitly
24-
force_try:
25-
severity: warning # explicitly
26-
# rules that have both warning and error levels, can set just the warning level
27-
# implicitly
28-
line_length:
29-
warning: 120
30-
ignores_function_declarations: true
31-
ignores_comments: true
32-
ignores_interpolated_strings: true
33-
ignores_urls: true
34-
# they can set both implicitly with an array
35-
type_body_length:
36-
- 300 # warning
37-
- 400 # error
38-
# or they can set both explicitly
39-
file_length:
40-
warning: 500
41-
error: 1200
42-
# naming rules can set warnings/errors for min_length and max_length
43-
# additionally they can set excluded names
44-
type_name:
45-
min_length: 4 # only warning
46-
max_length: # warning and error
47-
warning: 40
48-
error: 50
49-
excluded: iPhone # excluded via string
50-
identifier_name:
51-
min_length: # only min_length
52-
error: 4 # only error
53-
excluded: # excluded via string array
54-
- id
55-
- URL
56-
- GlobalAPIKey
57-
reporter: "xcode" # reporter type (xcode, json, csv, checkstyle, junit, html, emoji, sonarqube, markdown)
58-

GitTime/Sources/CompositionRoot.swift

Lines changed: 25 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -163,9 +163,11 @@ final class CompositionRoot {
163163

164164
extension CompositionRoot {
165165
// MARK: - Activity
166-
static func configureActivityScreen(activityService: ActivityServiceType,
167-
userService: UserServiceType,
168-
crawlerService: GitTimeCrawlerServiceType) -> ActivityViewController {
166+
static func configureActivityScreen(
167+
activityService: ActivityServiceType,
168+
userService: UserServiceType,
169+
crawlerService: GitTimeCrawlerServiceType
170+
) -> ActivityViewController {
169171
let reactor = ActivityViewReactor(activityService: activityService,
170172
userService: userService,
171173
crawlerService: crawlerService)
@@ -189,9 +191,11 @@ extension CompositionRoot {
189191
}
190192

191193
// MARK: - Setting
192-
static func configureSettingScreen(authService: AuthServiceType,
193-
githubService: GitHubServiceType,
194-
presentLoginScreen: @escaping () -> Void) -> SettingViewController {
194+
static func configureSettingScreen(
195+
authService: AuthServiceType,
196+
githubService: GitHubServiceType,
197+
presentLoginScreen: @escaping () -> Void
198+
) -> SettingViewController {
195199

196200
// 앱아이콘 변경
197201
var pushAppIconScreen: () -> AppIconsViewController
@@ -222,12 +226,14 @@ extension CompositionRoot {
222226
}
223227

224228
// MARK: - Buddy
225-
static func configureBuddyScreen(crawlerService: GitTimeCrawlerServiceType,
226-
realmService: RealmServiceType,
227-
userDefaultService: UserDefaultsServiceType,
228-
followService: FollowServiceType,
229-
userService: UserServiceType,
230-
githubService: GitHubServiceType) -> BuddyViewController {
229+
static func configureBuddyScreen(
230+
crawlerService: GitTimeCrawlerServiceType,
231+
realmService: RealmServiceType,
232+
userDefaultService: UserDefaultsServiceType,
233+
followService: FollowServiceType,
234+
userService: UserServiceType,
235+
githubService: GitHubServiceType
236+
) -> BuddyViewController {
231237

232238
var presentFollowScreen: () -> FollowViewController
233239
presentFollowScreen = {
@@ -246,15 +252,17 @@ extension CompositionRoot {
246252
controller.title = "Buddys"
247253
controller.tabBarItem.title = "Buddys"
248254
controller.tabBarItem.image = UIImage.assetImage(name: TabBarImages.follow)
249-
controller.tabBarItem.selectedImage = UIImage.assetImage(name: TabBarImages.followFilled)
255+
controller.tabBarItem.selectedImage = UIImage.assetImage(name: TabBarImages.followFilled)
250256
return controller
251257
}
252258

253259
// MARK: - Trending
254-
static func configureTrendingScreen(crawlerService: GitTimeCrawlerServiceType,
255-
languagesService: LanguagesServiceType,
256-
userDefaultService: UserDefaultsServiceType,
257-
realmService: RealmServiceType) -> TrendViewController {
260+
static func configureTrendingScreen(
261+
crawlerService: GitTimeCrawlerServiceType,
262+
languagesService: LanguagesServiceType,
263+
userDefaultService: UserDefaultsServiceType,
264+
realmService: RealmServiceType
265+
) -> TrendViewController {
258266

259267
var presentLanguageScreen: () -> LanguageListViewController
260268
presentLanguageScreen = {

GitTime/Sources/Models/Contribution.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ extension ContributionInfo: RealmPersistable {
9696
let contributionInfo = ContributionInfoObject()
9797
contributionInfo.count = self.count
9898
contributionInfo.userName = self.userName
99-
contributionInfo.additionalName = self.additionalName ?? ""
99+
contributionInfo.additionalName = self.additionalName
100100
// contributionInfo.contributions = self.contributions.map { $0.managedObject() }
101101
contributionInfo.createdAt = Date()
102102
return contributionInfo

GitTime/Sources/Network/GitTimeProvider.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import Toaster
1313
class GitTimeProvider<Target: TargetType>: MoyaProvider<Target> {
1414

1515
init(plugins: [PluginType]? = nil) {
16-
var finalPlugins: [PluginType] = plugins ?? [PluginType]()
16+
let finalPlugins: [PluginType] = plugins ?? [PluginType]()
1717
// finalPlugins.append(NetworkLoggerPlugin(verbose: true))
1818
super.init(plugins: finalPlugins)
1919
}

GitTime/Sources/Protocols/CellType.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
import UIKit
1010

11-
protocol CellType: class {
11+
protocol CellType: AnyObject {
1212
static var reuseIdentifier: String { get }
1313
static var cellFromNib: Self { get }
1414
}

GitTime/Sources/Protocols/ReactorBased.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import ReactorKit
1212
import RxCocoa
1313
import RxSwift
1414

15-
protocol ReactorBased: class {
15+
protocol ReactorBased: AnyObject {
1616

1717
}
1818

GitTime/Sources/Services/FollowService.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
import RxSwift
1010

11-
protocol FollowServiceType: class {
11+
protocol FollowServiceType: AnyObject {
1212
func fetchFollowers(userName: String, page: Int) -> Observable<[User]>
1313
func fetchFollowing(userName: String, page: Int) -> Observable<[User]>
1414
func trialFollow() -> Observable<[User]>

GitTime/Sources/Services/GitTimeCrawlerService.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
import RxSwift
1010
import Moya
1111

12-
protocol GitTimeCrawlerServiceType: class {
12+
protocol GitTimeCrawlerServiceType: AnyObject {
1313
func fetchTrendingRepositories(language: String?, period: String?, spokenLanguage: String?) -> Observable<[TrendRepo]>
1414
func fetchTrendingDevelopers(language: String?, period: String?) -> Observable<[TrendDeveloper]>
1515
func fetchContributions(userName: String) -> Observable<ContributionInfo>

GitTime/Sources/Services/KeychainService.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ enum KeychainKey {
1212
static let accessToken = "accessToken"
1313
}
1414

15-
protocol KeychainServiceType: class {
15+
protocol KeychainServiceType: AnyObject {
1616
func getAccessToken() -> String?
1717
func setAccessToken(_ token: String) throws
1818
func removeAccessToken() throws

GitTime/Sources/Services/RealmService.swift

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ import RealmSwift
1010
import RxSwift
1111
import SwiftUI
1212

13-
1413
protocol RealmServiceType {
1514
// Search History
1615
func addSearchText(text: String)
@@ -33,7 +32,7 @@ class RealmService: RealmServiceType {
3332

3433
var disposeBag = DisposeBag()
3534

36-
static let schemaVersion: UInt64 = 1
35+
static let schemaVersion: UInt64 = 2
3736

3837
init() {
3938
migration()

0 commit comments

Comments
 (0)