Skip to content

Commit

Permalink
[GWL-53] SwiftLint 수정 (#61)
Browse files Browse the repository at this point in the history
* build: swiftLint 수정

Trailing Comma, line_length 수정

* fix: SwiftLint 적용이 안되는 현상 개선

기존에 적용이 안되는 이유는 Scripts에 적혀있던데로 generate할 때 경로지정을 안해줬기 때문입니다.

* build: SwiftFormat sortedSwitchCases -> sortSwitchCase
  • Loading branch information
JongPyoAhn authored Nov 18, 2023
1 parent e2b0285 commit ba42645
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 2 deletions.
2 changes: 1 addition & 1 deletion iOS/.swiftformat
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
--enable docComments
--enable isEmpty
--enable markTypes
--enable sortedSwitchCases
--enable sortSwitchCases
--enable wrapEnumCases
--enable wrapSwitchCases
--guardelse "next-line"
Expand Down
8 changes: 8 additions & 0 deletions iOS/.swiftlint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ only_rules:
- void_return
- unowned_variable_capture
- custom_rules
- trailing_comma
- line_length

excluded:
- Carthage
Expand All @@ -25,6 +27,12 @@ colon:

indentation: 2

trailing_comma:
mandatory_comma: true

line_length:
warning: 150

custom_rules:
no_objcMembers:
name: "@objcMembers"
Expand Down
19 changes: 19 additions & 0 deletions iOS/Makefile
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -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 ."
}
Expand Down

0 comments on commit ba42645

Please sign in to comment.