Skip to content

Commit cdda8d9

Browse files
authored
[#461] 빌드, 테스트 타깃에 SwiftLint를 구성한다 (#462)
* chore: 각 모듈마다 SwiftLint 모듈 추가 * chore: 각 모듈의 swiftlint 설정을 프로젝트 루트의 swiftlint 파일을 참조하도록 처리 * fix: 불필요 생성자 제거 * chore: 각 레이어의 테스트 스킴에 SwiftLint 적용 * chore: 테스트 타겟 SwiftLint 설정 분리 * fix: lint: large_tuple 해결 * refactor: 위젯 히트맵 스냅샷 갱신 파라미터 정리 * fix: WidgetSnapshotUpdaterSpy 접근제한자 원복
1 parent eecad44 commit cdda8d9

29 files changed

Lines changed: 258 additions & 78 deletions

File tree

.swiftlint-tests.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
parent_config: .swiftlint.yml
2+
3+
disabled_rules:
4+
- identifier_name

Application/DevLogApp/DevLogApp.xcodeproj/project.pbxproj

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -354,6 +354,7 @@
354354
buildRules = (
355355
);
356356
dependencies = (
357+
DF66A07E2EA52E9F0098E643 /* PBXTargetDependency */,
357358
DF34164C2E45F67C00F9312B /* PBXTargetDependency */,
358359
);
359360
fileSystemSynchronizedGroups = (
@@ -638,6 +639,10 @@
638639
isa = PBXTargetDependency;
639640
productRef = DF66A07C2EA52E9F0098E643 /* plugin:SwiftLintBuildToolPlugin */;
640641
};
642+
DF66A07E2EA52E9F0098E643 /* PBXTargetDependency */ = {
643+
isa = PBXTargetDependency;
644+
productRef = DF66A07C2EA52E9F0098E643 /* plugin:SwiftLintBuildToolPlugin */;
645+
};
641646
DFD3A97E2F8E89DF001DA7CD /* PBXTargetDependency */ = {
642647
isa = PBXTargetDependency;
643648
target = DFD3A96F2F8E89DD001DA7CD /* DevLogWidgetExtension */;
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
parent_config: ../../../.swiftlint.yml
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
parent_config: ../../../.swiftlint-tests.yml

Application/DevLogCore/DevLogCore.xcodeproj/project.pbxproj

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,7 @@
108108
buildRules = (
109109
);
110110
dependencies = (
111+
C0DEAA000000000000000001 /* PBXTargetDependency */,
111112
);
112113
name = DevLogCore;
113114
productName = DevLogCore;
@@ -133,6 +134,9 @@
133134
);
134135
mainGroup = C0DE4BE90CB1A6B4CEDFCA61;
135136
minimizedProjectReferenceProxies = 0;
137+
packageReferences = (
138+
C0DEAA000000000000000002 /* XCRemoteSwiftPackageReference "SwiftLint" */,
139+
);
136140
preferredProjectObjectVersion = 77;
137141
productRefGroup = B66C037F848BDEE68DAC8902 /* Products */;
138142
projectDirPath = "";
@@ -167,6 +171,32 @@
167171
};
168172
/* End PBXSourcesBuildPhase section */
169173

174+
/* Begin PBXTargetDependency section */
175+
C0DEAA000000000000000001 /* PBXTargetDependency */ = {
176+
isa = PBXTargetDependency;
177+
productRef = C0DEAA000000000000000003 /* plugin:SwiftLintBuildToolPlugin */;
178+
};
179+
/* End PBXTargetDependency section */
180+
181+
/* Begin XCRemoteSwiftPackageReference section */
182+
C0DEAA000000000000000002 /* XCRemoteSwiftPackageReference "SwiftLint" */ = {
183+
isa = XCRemoteSwiftPackageReference;
184+
repositoryURL = "https://github.com/realm/SwiftLint";
185+
requirement = {
186+
kind = upToNextMajorVersion;
187+
minimumVersion = 0.62.1;
188+
};
189+
};
190+
/* End XCRemoteSwiftPackageReference section */
191+
192+
/* Begin XCSwiftPackageProductDependency section */
193+
C0DEAA000000000000000003 /* plugin:SwiftLintBuildToolPlugin */ = {
194+
isa = XCSwiftPackageProductDependency;
195+
package = C0DEAA000000000000000002 /* XCRemoteSwiftPackageReference "SwiftLint" */;
196+
productName = "plugin:SwiftLintBuildToolPlugin";
197+
};
198+
/* End XCSwiftPackageProductDependency section */
199+
170200
/* Begin XCBuildConfiguration section */
171201
0095EA3D0E3FC18B545418BE /* Debug */ = {
172202
isa = XCBuildConfiguration;
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
parent_config: ../../../.swiftlint.yml

Application/DevLogData/DevLogData.xcodeproj/project.pbxproj

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -358,6 +358,7 @@
358358
buildRules = (
359359
);
360360
dependencies = (
361+
DA7AAA000000000000000001 /* PBXTargetDependency */,
361362
C2D9D7E526019AEF507D8EFD /* PBXTargetDependency */,
362363
EAD8C47A731CEFD89B8D06EF /* PBXTargetDependency */,
363364
);
@@ -377,6 +378,7 @@
377378
buildRules = (
378379
);
379380
dependencies = (
381+
DA7AAA000000000000000004 /* PBXTargetDependency */,
380382
59B3918E35454521A69DAA14 /* PBXTargetDependency */,
381383
);
382384
name = DevLogDataTests;
@@ -409,6 +411,9 @@
409411
);
410412
mainGroup = FEAA5F036FEFF5A2BF2FD218;
411413
minimizedProjectReferenceProxies = 0;
414+
packageReferences = (
415+
DA7AAA000000000000000002 /* XCRemoteSwiftPackageReference "SwiftLint" */,
416+
);
412417
preferredProjectObjectVersion = 77;
413418
productRefGroup = 27CDFCFF9F1093391B8566A1 /* Products */;
414419
projectDirPath = "";
@@ -528,6 +533,14 @@
528533
/* End PBXSourcesBuildPhase section */
529534

530535
/* Begin PBXTargetDependency section */
536+
DA7AAA000000000000000001 /* PBXTargetDependency */ = {
537+
isa = PBXTargetDependency;
538+
productRef = DA7AAA000000000000000003 /* plugin:SwiftLintBuildToolPlugin */;
539+
};
540+
DA7AAA000000000000000004 /* PBXTargetDependency */ = {
541+
isa = PBXTargetDependency;
542+
productRef = DA7AAA000000000000000003 /* plugin:SwiftLintBuildToolPlugin */;
543+
};
531544
C2D9D7E526019AEF507D8EFD /* PBXTargetDependency */ = {
532545
isa = PBXTargetDependency;
533546
name = DevLogDomain;
@@ -545,6 +558,25 @@
545558
};
546559
/* End PBXTargetDependency section */
547560

561+
/* Begin XCRemoteSwiftPackageReference section */
562+
DA7AAA000000000000000002 /* XCRemoteSwiftPackageReference "SwiftLint" */ = {
563+
isa = XCRemoteSwiftPackageReference;
564+
repositoryURL = "https://github.com/realm/SwiftLint";
565+
requirement = {
566+
kind = upToNextMajorVersion;
567+
minimumVersion = 0.62.1;
568+
};
569+
};
570+
/* End XCRemoteSwiftPackageReference section */
571+
572+
/* Begin XCSwiftPackageProductDependency section */
573+
DA7AAA000000000000000003 /* plugin:SwiftLintBuildToolPlugin */ = {
574+
isa = XCSwiftPackageProductDependency;
575+
package = DA7AAA000000000000000002 /* XCRemoteSwiftPackageReference "SwiftLint" */;
576+
productName = "plugin:SwiftLintBuildToolPlugin";
577+
};
578+
/* End XCSwiftPackageProductDependency section */
579+
548580
/* Begin XCBuildConfiguration section */
549581
1E63E77475382EF159DBD932 /* Debug */ = {
550582
isa = XCBuildConfiguration;
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
parent_config: ../../../.swiftlint.yml

Application/DevLogData/Sources/Protocol/WidgetSnapshotUpdater.swift

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,5 @@ public protocol WidgetSnapshotUpdater {
2525
quarterStart: Date,
2626
now: Date
2727
)
28-
func updateHeatmapSnapshot(
29-
createdTodos: [Todo],
30-
completedTodos: [Todo],
31-
deletedTodos: [Todo],
32-
selectedActivityKinds: Set<ActivityKind>,
33-
quarterStart: Date,
34-
now: Date
35-
)
3628
func clear()
3729
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
parent_config: ../../../.swiftlint-tests.yml

0 commit comments

Comments
 (0)