diff --git a/.swiftformat b/.swiftformat index 472eefd4..62c8f1e6 100644 --- a/.swiftformat +++ b/.swiftformat @@ -1,5 +1,5 @@ # file options ---exclude Pods, Generated, **/*.generated.swift, fastlane/swift +--exclude Pods, Generated, **/*.generated.swift, fastlane/swift, ArkanaKeys # rules --disable fileHeader diff --git a/.swiftlint.yml b/.swiftlint.yml index e7d3d235..d0be68c4 100644 --- a/.swiftlint.yml +++ b/.swiftlint.yml @@ -9,9 +9,9 @@ excluded: - Pods - Derived - DerivedData + - ArkanaKeys opt_in_rules: - - anyobject_protocol - array_init - attributes - closure_body_length diff --git a/fastlane/Constants/Constant.swift b/fastlane/Constants/Constant.swift index c167b9f2..3e557829 100644 --- a/fastlane/Constants/Constant.swift +++ b/fastlane/Constants/Constant.swift @@ -125,14 +125,14 @@ extension Constant { let outputDirectoryURL = URL(fileURLWithPath: Constant.outputPath) return outputDirectoryURL.appendingPathComponent(productName + ".app" + Constant.dSYMSuffix).relativePath } - + var appleUsername: String { switch self { case .staging: return Constant.appleStagingUserName case .production: return Constant.appleProductionUserName } } - + var appleTeamId: String { switch self { case .staging: return Constant.appleStagingTeamId @@ -148,7 +148,7 @@ extension Constant { case appStore = "app-store" var value: String { return rawValue } - + var match: String { switch self { case .development: return "development" @@ -156,21 +156,21 @@ extension Constant { case .appStore: return "appstore" } } - + var configuration: String { switch self { case .development: return "Debug" case .adHoc, .appStore: return "Release" } } - + var codeSignIdentity: String { switch self { case .development: return "iPhone Developer" - case .adHoc, . appStore: return "iPhone Distribution" + case .adHoc, .appStore: return "iPhone Distribution" } } - + var method: String { switch self { case .development: return "Development" diff --git a/fastlane/Fastfile.swift b/fastlane/Fastfile.swift index 35fe6bbf..9da86063 100644 --- a/fastlane/Fastfile.swift +++ b/fastlane/Fastfile.swift @@ -19,7 +19,7 @@ class Fastfile: LaneFile { environment: .staging ) } - + func syncDevelopmentProductionCodeSigningLane() { desc("Sync the Development match signing for the Production build") Match.syncCodeSigning( @@ -51,7 +51,7 @@ class Fastfile: LaneFile { environment: .production ) } - + func removeKeychainLane() { desc("Delete keychain") Keychain.remove() diff --git a/fastlane/Helpers/Keychain.swift b/fastlane/Helpers/Keychain.swift index 539e1eb5..3ba60e06 100644 --- a/fastlane/Helpers/Keychain.swift +++ b/fastlane/Helpers/Keychain.swift @@ -7,7 +7,7 @@ // import Foundation - + enum Keychain { static func create() { @@ -19,7 +19,7 @@ enum Keychain { timeout: 115_200 ) } - + static func remove() { deleteKeychain( name: .userDefined(Constant.keychainName) diff --git a/fastlane/Helpers/Match.swift b/fastlane/Helpers/Match.swift index 2cf6c2a2..9d913d25 100644 --- a/fastlane/Helpers/Match.swift +++ b/fastlane/Helpers/Match.swift @@ -36,7 +36,7 @@ enum Match { } updateCodeSigning(type: type, environment: environment) } - + static func updateCodeSigning(type: Constant.BuildType, environment: Constant.Environment) { // Update Code signing from automatic to manual updateCodeSigningSettings( @@ -44,16 +44,16 @@ enum Match { useAutomaticSigning: .userDefined(false), teamId: .userDefined(environment.appleTeamId), targets: .userDefined([Constant.projectName]), - buildConfigurations: .userDefined([Self.createBuildConfiguration(type: type, environment: environment)]), + buildConfigurations: .userDefined([createBuildConfiguration(type: type, environment: environment)]), codeSignIdentity: .userDefined(type.codeSignIdentity), - profileName: .userDefined(Self.createProfileName(type: type, environment: environment)) + profileName: .userDefined(createProfileName(type: type, environment: environment)) ) } - + static func createBuildConfiguration(type: Constant.BuildType, environment: Constant.Environment) -> String { "\(type.configuration) \(environment.rawValue)" } - + static func createProfileName(type: Constant.BuildType, environment: Constant.Environment) -> String { "match \(type.method) \(environment.bundleId)" } diff --git a/{PROJECT_NAME}KIFUITests/Sources/Utilities/KIF+Swift.swift b/{PROJECT_NAME}KIFUITests/Sources/Utilities/KIF+Swift.swift index 66696b28..f5b3b712 100644 --- a/{PROJECT_NAME}KIFUITests/Sources/Utilities/KIF+Swift.swift +++ b/{PROJECT_NAME}KIFUITests/Sources/Utilities/KIF+Swift.swift @@ -8,10 +8,10 @@ import KIF extension KIFSpec { static func tester(file: String = #file, _ line: Int = #line) -> KIFUITestActor { - return KIFUITestActor(inFile: file, atLine: line, delegate: kifDelegate) + KIFUITestActor(inFile: file, atLine: line, delegate: kifDelegate) } static func system(file: String = #file, _ line: Int = #line) -> KIFSystemTestActor { - return KIFSystemTestActor(inFile: file, atLine: line, delegate: kifDelegate) + KIFSystemTestActor(inFile: file, atLine: line, delegate: kifDelegate) } } diff --git a/{PROJECT_NAME}Tests/Sources/Specs/Data/NetworkAPI/NetworkAPISpec.swift b/{PROJECT_NAME}Tests/Sources/Specs/Data/NetworkAPI/NetworkAPISpec.swift index 23e388c7..d65996e5 100644 --- a/{PROJECT_NAME}Tests/Sources/Specs/Data/NetworkAPI/NetworkAPISpec.swift +++ b/{PROJECT_NAME}Tests/Sources/Specs/Data/NetworkAPI/NetworkAPISpec.swift @@ -11,6 +11,7 @@ final class NetworkAPISpec: AsyncSpec { override class func spec() { + // swiftlint:disable closure_body_length describe("a NetworkAPI") { var networkAPI: NetworkAPI! @@ -60,5 +61,6 @@ final class NetworkAPISpec: AsyncSpec { } } } + // swiftlint:enable closure_body_length } }