diff --git a/Sources/BookmarksTestDBBuilder/BookmarksTestDBBuilder.swift b/Sources/BookmarksTestDBBuilder/BookmarksTestDBBuilder.swift index aee76de9d..e468960c9 100644 --- a/Sources/BookmarksTestDBBuilder/BookmarksTestDBBuilder.swift +++ b/Sources/BookmarksTestDBBuilder/BookmarksTestDBBuilder.swift @@ -254,7 +254,6 @@ public extension BookmarkEntity { makeWithModifiedAtConstraints(with: treeNode, rootFolder: rootFolder, favoritesFolders: favoritesFolders, in: context) } - // swiftlint:disable:next cyclomatic_complexity @discardableResult static func makeWithModifiedAtConstraints(with treeNode: BookmarkTreeNode, rootFolder: BookmarkEntity, favoritesFolders: [BookmarkEntity], in context: NSManagedObjectContext) -> BookmarkEntity { var entity: BookmarkEntity! diff --git a/Sources/BrowserServicesKit/Autofill/AutofillUserScript.swift b/Sources/BrowserServicesKit/Autofill/AutofillUserScript.swift index a140494c7..dd2f379c7 100644 --- a/Sources/BrowserServicesKit/Autofill/AutofillUserScript.swift +++ b/Sources/BrowserServicesKit/Autofill/AutofillUserScript.swift @@ -113,7 +113,6 @@ public class AutofillUserScript: NSObject, UserScript, UserScriptMessageEncrypti return jsonString }() - // swiftlint:disable:next cyclomatic_complexity public func messageHandlerFor(_ messageName: String) -> MessageHandler? { guard let message = MessageName(rawValue: messageName) else { os_log("Failed to parse Autofill User Script message: '%{public}s'", log: .userScripts, type: .debug, messageName) diff --git a/Sources/DDGSync/internal/SyncOperation.swift b/Sources/DDGSync/internal/SyncOperation.swift index f7b98b924..018c87fa3 100644 --- a/Sources/DDGSync/internal/SyncOperation.swift +++ b/Sources/DDGSync/internal/SyncOperation.swift @@ -125,7 +125,6 @@ final class SyncOperation: Operation, @unchecked Sendable { try await sync(fetchOnly: fetchOnly, dataProviders: dataProviders) } - // swiftlint:disable:next cyclomatic_complexity func sync(fetchOnly: Bool, dataProviders: [DataProviding] = []) async throws { os_log(.debug, log: log, "Sync Operation Started. Fetch-only: %{public}s", String(fetchOnly)) defer { diff --git a/Sources/Navigation/NavigationState.swift b/Sources/Navigation/NavigationState.swift index f28bc4eb4..e2e7d3279 100644 --- a/Sources/Navigation/NavigationState.swift +++ b/Sources/Navigation/NavigationState.swift @@ -62,7 +62,6 @@ public enum NavigationState: Equatable, Comparable { isFinished || isFailed } - // swiftlint:disable:next cyclomatic_complexity public static func == (lhs: NavigationState, rhs: NavigationState) -> Bool { switch lhs { case .expected(let navigationType): if case .expected(navigationType) = rhs { return true } diff --git a/Sources/NetworkProtection/ExtensionMessage/ExtensionMessage.swift b/Sources/NetworkProtection/ExtensionMessage/ExtensionMessage.swift index 6461945a9..7d53a266b 100644 --- a/Sources/NetworkProtection/ExtensionMessage/ExtensionMessage.swift +++ b/Sources/NetworkProtection/ExtensionMessage/ExtensionMessage.swift @@ -70,7 +70,6 @@ public enum ExtensionMessage: RawRepresentable { case simulateConnectionInterruption case getDataVolume - // swiftlint:disable:next cyclomatic_complexity public init?(rawValue data: Data) { let name = data.first.flatMap(Name.init(rawValue:)) switch name { diff --git a/Sources/NetworkProtection/Networking/Pinger.swift b/Sources/NetworkProtection/Networking/Pinger.swift index bdb70981e..e92606bb9 100644 --- a/Sources/NetworkProtection/Networking/Pinger.swift +++ b/Sources/NetworkProtection/Networking/Pinger.swift @@ -231,7 +231,6 @@ public extension Pinger { case decrypt_failed = 3 // decrypt failed } - // swiftlint:disable:next cyclomatic_complexity public init?(type: u_char, code: u_char) { switch type { case 0: diff --git a/Sources/NetworkProtection/PacketTunnelProvider.swift b/Sources/NetworkProtection/PacketTunnelProvider.swift index 71107f449..fb6496359 100644 --- a/Sources/NetworkProtection/PacketTunnelProvider.swift +++ b/Sources/NetworkProtection/PacketTunnelProvider.swift @@ -965,7 +965,6 @@ open class PacketTunnelProvider: NEPacketTunnelProvider { // MARK: - App Messages - // swiftlint:disable:next cyclomatic_complexity @MainActor public override func handleAppMessage(_ messageData: Data, completionHandler: ((Data?) -> Void)? = nil) { guard let message = ExtensionMessage(rawValue: messageData) else { @@ -1037,7 +1036,6 @@ open class PacketTunnelProvider: NEPacketTunnelProvider { settings.apply(change: change) } - // swiftlint:disable:next cyclomatic_complexity private func handleSettingsChange(_ change: VPNSettings.Change, completionHandler: ((Data?) -> Void)? = nil) { switch change { case .setExcludeLocalNetworks: diff --git a/Sources/NetworkProtection/Settings/VPNSettings.swift b/Sources/NetworkProtection/Settings/VPNSettings.swift index d568b8acc..167b1e8c9 100644 --- a/Sources/NetworkProtection/Settings/VPNSettings.swift +++ b/Sources/NetworkProtection/Settings/VPNSettings.swift @@ -209,7 +209,6 @@ public final class VPNSettings { // MARK: - Applying Changes - // swiftlint:disable cyclomatic_complexity public func apply(change: Change) { switch change { case .setConnectOnLogin(let connectOnLogin): @@ -238,7 +237,6 @@ public final class VPNSettings { self.disableRekeying = disableRekeying } } - // swiftlint:enable cyclomatic_complexity // MARK: - Connect on Login diff --git a/Sources/PixelKit/PixelKit.swift b/Sources/PixelKit/PixelKit.swift index 4ff2f9301..c2e760976 100644 --- a/Sources/PixelKit/PixelKit.swift +++ b/Sources/PixelKit/PixelKit.swift @@ -163,7 +163,6 @@ public final class PixelKit { logger.debug("👾 PixelKit initialised: dryRun: \(self.dryRun, privacy: .public) appVersion: \(self.appVersion, privacy: .public) source: \(self.source ?? "-", privacy: .public) defaultHeaders: \(self.defaultHeaders, privacy: .public) pixelCalendar: \(self.pixelCalendar, privacy: .public)") } - // swiftlint:disable:next cyclomatic_complexity private func fire(pixelNamed pixelName: String, frequency: Frequency, withHeaders headers: [String: String]?, diff --git a/Sources/PrivacyDashboard/PrivacyDashboardUserScript.swift b/Sources/PrivacyDashboard/PrivacyDashboardUserScript.swift index 5c8ea5d96..d6703dcb3 100644 --- a/Sources/PrivacyDashboard/PrivacyDashboardUserScript.swift +++ b/Sources/PrivacyDashboard/PrivacyDashboardUserScript.swift @@ -141,7 +141,6 @@ final class PrivacyDashboardUserScript: NSObject, StaticUserScript { weak var delegate: PrivacyDashboardUserScriptDelegate? - // swiftlint:disable:next cyclomatic_complexity func userContentController(_ userContentController: WKUserContentController, didReceive message: WKScriptMessage) { guard let messageType = MessageNames(rawValue: message.name) else { assertionFailure("PrivacyDashboardUserScript: unexpected message name \(message.name)") diff --git a/Sources/RemoteMessaging/Mappers/JsonToRemoteMessageModelMapper.swift b/Sources/RemoteMessaging/Mappers/JsonToRemoteMessageModelMapper.swift index 41bd63623..d02be631c 100644 --- a/Sources/RemoteMessaging/Mappers/JsonToRemoteMessageModelMapper.swift +++ b/Sources/RemoteMessaging/Mappers/JsonToRemoteMessageModelMapper.swift @@ -19,7 +19,6 @@ import Common import Foundation -// swiftlint:disable cyclomatic_complexity private enum AttributesKey: String, CaseIterable { case locale case osApi @@ -73,7 +72,6 @@ private enum AttributesKey: String, CaseIterable { } } } -// swiftlint:enable cyclomatic_complexity struct JsonToRemoteMessageModelMapper { @@ -99,7 +97,6 @@ struct JsonToRemoteMessageModelMapper { return remoteMessages } - // swiftlint:disable:next cyclomatic_complexity static func mapToContent(content: RemoteMessageResponse.JsonContent, surveyActionMapper: RemoteMessagingSurveyActionMapping) -> RemoteMessageModelType? { switch RemoteMessageResponse.JsonMessageType(rawValue: content.messageType) { diff --git a/Sources/RemoteMessaging/Matchers/AppAttributeMatcher.swift b/Sources/RemoteMessaging/Matchers/AppAttributeMatcher.swift index 5ad348fce..039849026 100644 --- a/Sources/RemoteMessaging/Matchers/AppAttributeMatcher.swift +++ b/Sources/RemoteMessaging/Matchers/AppAttributeMatcher.swift @@ -47,7 +47,6 @@ public struct AppAttributeMatcher: AttributeMatching { self.variantManager = variantManager } - // swiftlint:disable cyclomatic_complexity public func evaluate(matchingAttribute: MatchingAttribute) -> EvaluationResult? { switch matchingAttribute { case let matchingAttribute as IsInternalUserMatchingAttribute: @@ -95,5 +94,4 @@ public struct AppAttributeMatcher: AttributeMatching { return nil } } - // swiftlint:enable cyclomatic_complexity } diff --git a/Sources/Subscription/Flows/AppStore/AppStorePurchaseFlow.swift b/Sources/Subscription/Flows/AppStore/AppStorePurchaseFlow.swift index ff35bbcd0..4239be257 100644 --- a/Sources/Subscription/Flows/AppStore/AppStorePurchaseFlow.swift +++ b/Sources/Subscription/Flows/AppStore/AppStorePurchaseFlow.swift @@ -59,7 +59,6 @@ public final class DefaultAppStorePurchaseFlow: AppStorePurchaseFlow { self.authEndpointService = authEndpointService } - // swiftlint:disable cyclomatic_complexity public func purchaseSubscription(with subscriptionIdentifier: String, emailAccessToken: String?) async -> Result { os_log(.info, log: .subscription, "[AppStorePurchaseFlow] purchaseSubscription") let externalID: String @@ -116,7 +115,6 @@ public final class DefaultAppStorePurchaseFlow: AppStorePurchaseFlow { } } - // swiftlint:enable cyclomatic_complexity @discardableResult public func completeSubscriptionPurchase(with transactionJWS: TransactionJWS) async -> Result { diff --git a/Sources/Subscription/SubscriptionURL.swift b/Sources/Subscription/SubscriptionURL.swift index a6cd6a10e..107636f4f 100644 --- a/Sources/Subscription/SubscriptionURL.swift +++ b/Sources/Subscription/SubscriptionURL.swift @@ -33,7 +33,6 @@ public enum SubscriptionURL { case manageSubscriptionsInAppStore case identityTheftRestoration - // swiftlint:disable:next cyclomatic_complexity public func subscriptionURL(environment: SubscriptionEnvironment.ServiceEnvironment) -> URL { switch self { case .baseURL: