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/.swiftlint.yml b/iOS/.swiftlint.yml index 0f816928..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 @@ -25,6 +27,12 @@ colon: indentation: 2 +trailing_comma: + mandatory_comma: true + +line_length: + warning: 150 + custom_rules: no_objcMembers: name: "@objcMembers" 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/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 ." }