diff --git a/.swiftlint.yml b/.swiftlint.yml index 36cc38a..cbc11b6 100644 --- a/.swiftlint.yml +++ b/.swiftlint.yml @@ -17,6 +17,11 @@ missing_docs: - public - open +analyzer_rules: + - capture_variable + - unused_declaration + - unused_import + opt_in_rules: - attributes - balanced_xctest_lifecycle @@ -71,8 +76,6 @@ opt_in_rules: - trailing_closure - type_contents_order - unneeded_parentheses_in_closure_argument - - unused_declaration - - unused_import - vertical_parameter_alignment_on_call - vertical_whitespace_closing_braces - yoda_condition diff --git a/Mist/AppDelegate.swift b/Mist/AppDelegate.swift index cc314da..038c40a 100644 --- a/Mist/AppDelegate.swift +++ b/Mist/AppDelegate.swift @@ -5,7 +5,7 @@ // Created by Nindi Gill on 16/6/2022. // -import Cocoa +import AppKit import UserNotifications class AppDelegate: NSObject, NSApplicationDelegate { diff --git a/Mist/Extensions/Array+Extension.swift b/Mist/Extensions/Array+Extension.swift index ed46845..ea6b82f 100644 --- a/Mist/Extensions/Array+Extension.swift +++ b/Mist/Extensions/Array+Extension.swift @@ -5,8 +5,6 @@ // Created by Nindi Gill on 20/6/2022. // -import Foundation - extension Array where Element == UInt8 { func uInt8(at offset: Int) -> UInt8 { diff --git a/Mist/Helpers/ProcessKiller.swift b/Mist/Helpers/ProcessKiller.swift index e5da6c8..916907e 100644 --- a/Mist/Helpers/ProcessKiller.swift +++ b/Mist/Helpers/ProcessKiller.swift @@ -5,7 +5,6 @@ // Created by Nindi Gill on 29/6/2022. // -import Foundation import SecureXPC /// Helper struct to kill the child process of the Privileted Helper Tool. diff --git a/Mist/MistApp.swift b/Mist/MistApp.swift index a7e3d64..1314d47 100644 --- a/Mist/MistApp.swift +++ b/Mist/MistApp.swift @@ -5,7 +5,6 @@ // Created by Nindi Gill on 13/6/2022. // -import Sparkle import SwiftUI @main diff --git a/Mist/Model/CatalogSeedType.swift b/Mist/Model/CatalogSeedType.swift index c329d86..8a4ae94 100644 --- a/Mist/Model/CatalogSeedType.swift +++ b/Mist/Model/CatalogSeedType.swift @@ -5,8 +5,6 @@ // Created by Nindi Gill on 8/12/2022. // -import Foundation - enum CatalogSeedType: String { case standard = "Standard" case customer = "Customer" diff --git a/Mist/Model/CatalogType.swift b/Mist/Model/CatalogType.swift index f09af2c..956f8e1 100644 --- a/Mist/Model/CatalogType.swift +++ b/Mist/Model/CatalogType.swift @@ -5,8 +5,6 @@ // Created by Nindi Gill on 13/6/2022. // -import Foundation - enum CatalogType: String, CaseIterable, Comparable, Decodable { case ventura = "macOS Ventura" case monterey = "macOS Monterey" diff --git a/Mist/Model/DownloadAlertType.swift b/Mist/Model/DownloadAlertType.swift index c8b35a1..479f4cc 100644 --- a/Mist/Model/DownloadAlertType.swift +++ b/Mist/Model/DownloadAlertType.swift @@ -5,8 +5,6 @@ // Created by Nindi Gill on 14/7/2022. // -import Foundation - enum DownloadAlertType: String { case compatibility = "Compatiblity" case helperTool = "Helper Tool" diff --git a/Mist/Model/DownloadType.swift b/Mist/Model/DownloadType.swift index cebf645..82bee6c 100644 --- a/Mist/Model/DownloadType.swift +++ b/Mist/Model/DownloadType.swift @@ -5,8 +5,6 @@ // Created by Nindi Gill on 13/6/2022. // -import Foundation - enum DownloadType: String, CaseIterable, Identifiable { case firmware = "Firmware" case installer = "Installer" diff --git a/Mist/Model/ExportListType.swift b/Mist/Model/ExportListType.swift index 2ba7ee7..e9d62c8 100644 --- a/Mist/Model/ExportListType.swift +++ b/Mist/Model/ExportListType.swift @@ -5,7 +5,6 @@ // Created by Nindi Gill on 13/6/2022. // -import Foundation import UniformTypeIdentifiers enum ExportListType: String, CaseIterable, Identifiable { diff --git a/Mist/Model/InstallerExportType.swift b/Mist/Model/InstallerExportType.swift index 3f5db70..a861f54 100644 --- a/Mist/Model/InstallerExportType.swift +++ b/Mist/Model/InstallerExportType.swift @@ -5,8 +5,6 @@ // Created by Nindi Gill on 17/6/2022. // -import Foundation - enum InstallerExportType: String, CaseIterable, Identifiable { case application = "Application" case diskImage = "Disk Image" diff --git a/Mist/Model/MistTaskSection.swift b/Mist/Model/MistTaskSection.swift index 988567f..219872a 100644 --- a/Mist/Model/MistTaskSection.swift +++ b/Mist/Model/MistTaskSection.swift @@ -5,8 +5,6 @@ // Created by Nindi Gill on 25/6/2022. // -import Foundation - enum MistTaskSection: String, CaseIterable, Identifiable { case download = "Download" case setup = "Setup" diff --git a/Mist/Model/MistTaskType.swift b/Mist/Model/MistTaskType.swift index 3fcf25c..08fd1b1 100644 --- a/Mist/Model/MistTaskType.swift +++ b/Mist/Model/MistTaskType.swift @@ -5,8 +5,6 @@ // Created by Nindi Gill on 17/6/2022. // -import Foundation - enum MistTaskType: String { case download = "Download" case verify = "Verify" diff --git a/Mist/Model/ProgressAlertType.swift b/Mist/Model/ProgressAlertType.swift index 296462e..c351cc7 100644 --- a/Mist/Model/ProgressAlertType.swift +++ b/Mist/Model/ProgressAlertType.swift @@ -5,8 +5,6 @@ // Created by Nindi Gill on 27/6/2022. // -import Foundation - enum ProgressAlertType: String { case cancel = "Cancel" case error = "Error" diff --git a/Mist/Model/RefreshState.swift b/Mist/Model/RefreshState.swift index 87254cf..c7fa72a 100644 --- a/Mist/Model/RefreshState.swift +++ b/Mist/Model/RefreshState.swift @@ -5,7 +5,6 @@ // Created by Nindi Gill on 23/6/2022. // -import Foundation import SwiftUI enum RefreshState: String, CaseIterable, Identifiable { diff --git a/Mist/UserNotificationCenterDelegate.swift b/Mist/UserNotificationCenterDelegate.swift index 1636f65..db9d265 100644 --- a/Mist/UserNotificationCenterDelegate.swift +++ b/Mist/UserNotificationCenterDelegate.swift @@ -5,7 +5,7 @@ // Created by Nindi Gill on 23/6/2022. // -import Cocoa +import AppKit import UserNotifications class UserNotificationCenterDelegate: NSObject, UNUserNotificationCenterDelegate { diff --git a/Shared/HelperToolCommandRequest.swift b/Shared/HelperToolCommandRequest.swift index bde7055..af2fb5f 100644 --- a/Shared/HelperToolCommandRequest.swift +++ b/Shared/HelperToolCommandRequest.swift @@ -5,8 +5,6 @@ // Created by Nindi Gill on 21/6/2022. // -import Foundation - struct HelperToolCommandRequest: Codable { let type: HelperToolCommandType let arguments: [String] diff --git a/Shared/HelperToolCommandResponse.swift b/Shared/HelperToolCommandResponse.swift index 470ab0f..4680623 100644 --- a/Shared/HelperToolCommandResponse.swift +++ b/Shared/HelperToolCommandResponse.swift @@ -5,8 +5,6 @@ // Created by Nindi Gill on 21/6/2022. // -import Foundation - struct HelperToolCommandResponse: Codable { let terminationStatus: Int32 let standardOutput: String? diff --git a/Shared/HelperToolCommandType.swift b/Shared/HelperToolCommandType.swift index 94875d9..6314726 100644 --- a/Shared/HelperToolCommandType.swift +++ b/Shared/HelperToolCommandType.swift @@ -5,8 +5,6 @@ // Created by Nindi Gill on 21/6/2022. // -import Foundation - enum HelperToolCommandType: String, Codable { // swiftlint:disable:next redundant_string_enum_value case remove = "remove" diff --git a/Shared/XPCRoute+Extension.swift b/Shared/XPCRoute+Extension.swift index c2ccad5..30c13e8 100644 --- a/Shared/XPCRoute+Extension.swift +++ b/Shared/XPCRoute+Extension.swift @@ -5,7 +5,6 @@ // Created by Nindi Gill on 21/6/2022. // -import Foundation import SecureXPC extension XPCRoute {