From 7c11a8c31afe7a0d00ee901b28985def440bc058 Mon Sep 17 00:00:00 2001 From: JongPyoAhn Date: Sat, 18 Nov 2023 01:38:59 +0900 Subject: [PATCH 1/3] =?UTF-8?q?build:=20swiftLint=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Trailing Comma, line_length 수정 --- iOS/.swiftlint.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/iOS/.swiftlint.yml b/iOS/.swiftlint.yml index 0f816928..c75d0ce9 100644 --- a/iOS/.swiftlint.yml +++ b/iOS/.swiftlint.yml @@ -25,6 +25,12 @@ colon: indentation: 2 +trailing_comma: + mandatory_comma: true + +line_length: + warning: 150 + custom_rules: no_objcMembers: name: "@objcMembers" From e0af1b73469cd48ff13f970183c5ea4c1e8eb406 Mon Sep 17 00:00:00 2001 From: JongPyoAhn Date: Sat, 18 Nov 2023 15:40:58 +0900 Subject: [PATCH 2/3] =?UTF-8?q?fix:=20SwiftLint=20=EC=A0=81=EC=9A=A9?= =?UTF-8?q?=EC=9D=B4=20=EC=95=88=EB=90=98=EB=8A=94=20=ED=98=84=EC=83=81=20?= =?UTF-8?q?=EA=B0=9C=EC=84=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 기존에 적용이 안되는 이유는 Scripts에 적혀있던데로 generate할 때 경로지정을 안해줬기 때문입니다. --- iOS/.swiftlint.yml | 2 ++ iOS/Makefile | 19 +++++++++++++++++++ .../Shared/TNCocoaCombine/Project.swift | 1 + .../Scripts+Templates.swift | 2 +- 4 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 iOS/Makefile diff --git a/iOS/.swiftlint.yml b/iOS/.swiftlint.yml index c75d0ce9..3330e514 100644 --- a/iOS/.swiftlint.yml +++ b/iOS/.swiftlint.yml @@ -14,6 +14,8 @@ only_rules: - void_return - unowned_variable_capture - custom_rules + - trailing_comma + - line_length excluded: - Carthage diff --git a/iOS/Makefile b/iOS/Makefile new file mode 100644 index 00000000..71dac86b --- /dev/null +++ b/iOS/Makefile @@ -0,0 +1,19 @@ +generate: + tuist fetch + TUIST_ROOT_DIR=${PWD} tuist generate + +test: + tuist clean + tuist fetch + TUIST_ROOT_DIR=${PWD} tuist test +build: + TUIST_ROOT_DIR=${PWD} tuist build + +clean: + rm -rf **/*.xcodeproj + rm -rf *.xcworkspace + +reset: + tuist clean + rm -rf **/*.xcodeproj + rm -rf *.xcworkspace diff --git a/iOS/Projects/Shared/TNCocoaCombine/Project.swift b/iOS/Projects/Shared/TNCocoaCombine/Project.swift index 40e52f03..6b9dc297 100644 --- a/iOS/Projects/Shared/TNCocoaCombine/Project.swift +++ b/iOS/Projects/Shared/TNCocoaCombine/Project.swift @@ -4,5 +4,6 @@ import ProjectDescriptionHelpers let project = Project.makeModule( name: "TNCocoaCombine", product: .framework, + resources: nil, isTestable: false ) diff --git a/iOS/Tuist/ProjectDescriptionHelpers/Scripts+Templates.swift b/iOS/Tuist/ProjectDescriptionHelpers/Scripts+Templates.swift index 2f4036cd..beacb3e9 100644 --- a/iOS/Tuist/ProjectDescriptionHelpers/Scripts+Templates.swift +++ b/iOS/Tuist/ProjectDescriptionHelpers/Scripts+Templates.swift @@ -12,7 +12,7 @@ private let tuistRootDirectory = ProcessInfo.processInfo.environment["TUIST_ROOT private func swiftFormatCommand() -> String { if let tuistRootDirectory { - return "swiftformat --config \(tuistRootDirectory)/swiftformat ." + return "swiftformat . --config \(tuistRootDirectory)/.swiftformat" } else { return "swiftformat ." } From ff0aa8a19ab0103c5c5dd9ab582cfdf4a77bbe0c Mon Sep 17 00:00:00 2001 From: JongPyoAhn Date: Sat, 18 Nov 2023 15:43:15 +0900 Subject: [PATCH 3/3] build: SwiftFormat sortedSwitchCases -> sortSwitchCase --- iOS/.swiftformat | 2 +- iOS/Projects/Shared/TNCocoaCombine/Project.swift | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/iOS/.swiftformat b/iOS/.swiftformat index 40546cb5..fa2c2007 100644 --- a/iOS/.swiftformat +++ b/iOS/.swiftformat @@ -13,7 +13,7 @@ --enable docComments --enable isEmpty --enable markTypes ---enable sortedSwitchCases +--enable sortSwitchCases --enable wrapEnumCases --enable wrapSwitchCases --guardelse "next-line" diff --git a/iOS/Projects/Shared/TNCocoaCombine/Project.swift b/iOS/Projects/Shared/TNCocoaCombine/Project.swift index 6b9dc297..40e52f03 100644 --- a/iOS/Projects/Shared/TNCocoaCombine/Project.swift +++ b/iOS/Projects/Shared/TNCocoaCombine/Project.swift @@ -4,6 +4,5 @@ import ProjectDescriptionHelpers let project = Project.makeModule( name: "TNCocoaCombine", product: .framework, - resources: nil, isTestable: false )