From b0660a0ea78d27dc00ada81fbe7c0a4dc76df0b4 Mon Sep 17 00:00:00 2001 From: Brent Simmons Date: Thu, 23 Jan 2025 21:50:40 -0800 Subject: [PATCH] Fix lint issues. --- .swiftlint.yml | 1 + Shared/ShareExtension/ExtensionContainersFile.swift | 1 - Shared/ShareExtension/ExtensionFeedAddRequestFile.swift | 1 - Shared/Tree/FeedTreeControllerDelegate.swift | 1 - Shared/Widget/WidgetDataDecoder.swift | 1 - 5 files changed, 1 insertion(+), 4 deletions(-) diff --git a/.swiftlint.yml b/.swiftlint.yml index 963794106..99269ae74 100644 --- a/.swiftlint.yml +++ b/.swiftlint.yml @@ -12,6 +12,7 @@ disabled_rules: - todo - for_where - file_length + - force_cast excluded: - Modules/Secrets/Sources/Secrets/SecretKey.swift diff --git a/Shared/ShareExtension/ExtensionContainersFile.swift b/Shared/ShareExtension/ExtensionContainersFile.swift index ccb9e6220..74438009a 100644 --- a/Shared/ShareExtension/ExtensionContainersFile.swift +++ b/Shared/ShareExtension/ExtensionContainersFile.swift @@ -17,7 +17,6 @@ final class ExtensionContainersFile { private static var log = OSLog(subsystem: Bundle.main.bundleIdentifier!, category: "extensionContainersFile") private static var filePath: String = { - // swiftlint:disable:next force_cast let appGroup = Bundle.main.object(forInfoDictionaryKey: "AppGroup") as! String let containerURL = FileManager.default.containerURL(forSecurityApplicationGroupIdentifier: appGroup) return containerURL!.appendingPathComponent("extension_containers.plist").path diff --git a/Shared/ShareExtension/ExtensionFeedAddRequestFile.swift b/Shared/ShareExtension/ExtensionFeedAddRequestFile.swift index ed0e7a506..b9529a7c0 100644 --- a/Shared/ShareExtension/ExtensionFeedAddRequestFile.swift +++ b/Shared/ShareExtension/ExtensionFeedAddRequestFile.swift @@ -15,7 +15,6 @@ final class ExtensionFeedAddRequestFile: NSObject, NSFilePresenter { private static var log = OSLog(subsystem: Bundle.main.bundleIdentifier!, category: "extensionFeedAddRequestFile") private static var filePath: String = { - // swiftlint:disable:next force_cast let appGroup = Bundle.main.object(forInfoDictionaryKey: "AppGroup") as! String let containerURL = FileManager.default.containerURL(forSecurityApplicationGroupIdentifier: appGroup) return containerURL!.appendingPathComponent("extension_feed_add_request.plist").path diff --git a/Shared/Tree/FeedTreeControllerDelegate.swift b/Shared/Tree/FeedTreeControllerDelegate.swift index a6a7ccac5..ed8ce901e 100644 --- a/Shared/Tree/FeedTreeControllerDelegate.swift +++ b/Shared/Tree/FeedTreeControllerDelegate.swift @@ -62,7 +62,6 @@ private extension FeedTreeControllerDelegate { } func childNodesForContainerNode(_ containerNode: Node) -> [Node]? { - // swiftlint:disable:next force_cast let container = containerNode.representedObject as! Container var children = [AnyObject]() diff --git a/Shared/Widget/WidgetDataDecoder.swift b/Shared/Widget/WidgetDataDecoder.swift index 5820da049..a7f57064e 100644 --- a/Shared/Widget/WidgetDataDecoder.swift +++ b/Shared/Widget/WidgetDataDecoder.swift @@ -11,7 +11,6 @@ import Foundation struct WidgetDataDecoder { static func decodeWidgetData() throws -> WidgetData { - // swiftlint:disable:next force_cast let appGroup = Bundle.main.object(forInfoDictionaryKey: "AppGroup") as! String let containerURL = FileManager.default.containerURL(forSecurityApplicationGroupIdentifier: appGroup) let dataURL = containerURL?.appendingPathComponent("widget-data.json")