Skip to content

Commit 5651764

Browse files
committed
Mark classes as final that can be marked as final.
1 parent 48fc807 commit 5651764

File tree

155 files changed

+172
-172
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

155 files changed

+172
-172
lines changed

Mac/AppDelegate.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ import Sparkle
2222
var appDelegate: AppDelegate!
2323

2424
@NSApplicationMain
25-
class AppDelegate: NSObject, NSApplicationDelegate, NSUserInterfaceValidations, UNUserNotificationCenterDelegate, UnreadCountProvider, SPUStandardUserDriverDelegate, SPUUpdaterDelegate {
25+
final class AppDelegate: NSObject, NSApplicationDelegate, NSUserInterfaceValidations, UNUserNotificationCenterDelegate, UnreadCountProvider, SPUStandardUserDriverDelegate, SPUUpdaterDelegate {
2626

2727
private struct WindowRestorationIdentifiers {
2828
static let mainWindow = "mainWindow"

Mac/MainWindow/AddFeed/AddFeedController.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ import Parser
2222
// Else,
2323
// display error sheet.
2424

25-
class AddFeedController: AddFeedWindowControllerDelegate {
25+
final class AddFeedController: AddFeedWindowControllerDelegate {
2626

2727
private let hostWindow: NSWindow
2828
private var addFeedWindowController: AddFeedWindowController?

Mac/MainWindow/AddFeed/FolderTreeMenu.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import RSCore
1111
import RSTree
1212
import Account
1313

14-
class FolderTreeMenu {
14+
final class FolderTreeMenu {
1515

1616
static func createFolderPopupMenu(with rootNode: Node, restrictToSpecialAccounts: Bool = false) -> NSMenu {
1717

Mac/MainWindow/AddFolder/AddFolderWindowController.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import AppKit
1010
import Articles
1111
import Account
1212

13-
class AddFolderWindowController: NSWindowController {
13+
final class AddFolderWindowController: NSWindowController {
1414

1515
@IBOutlet var folderNameTextField: NSTextField!
1616
@IBOutlet var accountPopupButton: NSPopUpButton!

Mac/MainWindow/ArticleExtractorButton.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ enum ArticleExtractorButtonState {
1515
case off
1616
}
1717

18-
class ArticleExtractorButton: NSButton {
18+
final class ArticleExtractorButton: NSButton {
1919

2020
private var animatedLayer: CALayer?
2121

Mac/MainWindow/LegacyArticleExtractorButton.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
import Foundation
1010

11-
class LegacyArticleExtractorButton: NSButton {
11+
final class LegacyArticleExtractorButton: NSButton {
1212

1313
var isError = false {
1414
didSet {

Mac/MainWindow/MainWindowController.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ enum TimelineSourceMode {
1616
case regular, search
1717
}
1818

19-
class MainWindowController: NSWindowController, NSUserInterfaceValidations {
19+
final class MainWindowController: NSWindowController, NSUserInterfaceValidations {
2020

2121
@IBOutlet weak var articleThemePopUpButton: NSPopUpButton?
2222

Mac/MainWindow/OPML/ExportOPMLWindowController.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import AppKit
1010
import Account
1111
import UniformTypeIdentifiers
1212

13-
class ExportOPMLWindowController: NSWindowController {
13+
final class ExportOPMLWindowController: NSWindowController {
1414

1515
@IBOutlet weak var accountPopUpButton: NSPopUpButton!
1616
private weak var hostWindow: NSWindow?

Mac/MainWindow/OPML/ImportOPMLWindowController.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import AppKit
1010
import Account
1111
import UniformTypeIdentifiers
1212

13-
class ImportOPMLWindowController: NSWindowController {
13+
final class ImportOPMLWindowController: NSWindowController {
1414

1515
@IBOutlet weak var accountPopUpButton: NSPopUpButton!
1616
private weak var hostWindow: NSWindow?

Mac/MainWindow/Sidebar/Cell/SidebarCell.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import RSCore
1111
import Account
1212
import RSTree
1313

14-
class SidebarCell: NSTableCellView {
14+
final class SidebarCell: NSTableCellView {
1515

1616
var iconImage: IconImage? {
1717
didSet {

Mac/MainWindow/Sidebar/SidebarOutlineView.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import AppKit
1010
import RSCore
1111
import RSTree
1212

13-
class SidebarOutlineView: NSOutlineView {
13+
final class SidebarOutlineView: NSOutlineView {
1414

1515
@IBOutlet var keyboardDelegate: KeyboardDelegate!
1616

Mac/MainWindow/Sidebar/SidebarViewController.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ protocol SidebarDelegate: AnyObject {
2222
func sidebarInvalidatedRestorationState(_: SidebarViewController)
2323
}
2424

25-
@objc class SidebarViewController: NSViewController, NSOutlineViewDelegate, NSMenuDelegate, UndoableCommandRunner {
25+
@objc final class SidebarViewController: NSViewController, NSOutlineViewDelegate, NSMenuDelegate, UndoableCommandRunner {
2626

2727
@IBOutlet weak var outlineView: NSOutlineView!
2828

Mac/MainWindow/Sidebar/UnreadCountView.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
import AppKit
1010

11-
class UnreadCountView: NSView {
11+
final class UnreadCountView: NSView {
1212

1313
struct Appearance {
1414
static let padding = NSEdgeInsets(top: 1.0, left: 7.0, bottom: 1.0, right: 7.0)

Mac/MainWindow/Timeline/Cell/TimelineTableCellView.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
import AppKit
1010
import RSCore
1111

12-
class TimelineTableCellView: NSTableCellView {
12+
final class TimelineTableCellView: NSTableCellView {
1313

1414
private let titleView = TimelineTableCellView.multiLineTextField()
1515
private let summaryView = TimelineTableCellView.multiLineTextField()

Mac/MainWindow/Timeline/Cell/UnreadIndicatorView.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
import AppKit
1010

11-
class UnreadIndicatorView: NSView {
11+
final class UnreadIndicatorView: NSView {
1212

1313
static let unreadCircleDimension: CGFloat = 8.0
1414

Mac/MainWindow/Timeline/TimelineTableRowView.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
import AppKit
1010

11-
class TimelineTableRowView: NSTableRowView {
11+
final class TimelineTableRowView: NSTableRowView {
1212

1313
private var separator: NSView?
1414

Mac/MainWindow/Timeline/TimelineTableView.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
import AppKit
1010
import RSCore
1111

12-
class TimelineTableView: NSTableView {
12+
final class TimelineTableView: NSTableView {
1313

1414
weak var keyboardDelegate: KeyboardDelegate?
1515

Mac/Preferences/Accounts/AccountCell.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
import AppKit
1010

11-
class AccountCell: NSTableCellView {
11+
final class AccountCell: NSTableCellView {
1212

1313
private var originalImage: NSImage?
1414

Mac/Preferences/Accounts/AccountsAddCloudKitWindowController.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ enum AccountsAddCloudKitWindowControllerError: LocalizedError {
1717
}
1818
}
1919

20-
class AccountsAddCloudKitWindowController: NSWindowController {
20+
final class AccountsAddCloudKitWindowController: NSWindowController {
2121

2222
@IBOutlet weak var limitationsAndSolutionsTextField: NSTextField!
2323

Mac/Preferences/Accounts/AccountsAddLocalWindowController.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
import AppKit
1010
import Account
1111

12-
class AccountsAddLocalWindowController: NSWindowController {
12+
final class AccountsAddLocalWindowController: NSWindowController {
1313

1414
@IBOutlet private weak var nameTextField: NSTextField!
1515
@IBOutlet private weak var localAccountNameTextField: NSTextField!

Mac/Preferences/Accounts/AccountsFeedbinWindowController.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import Account
1111
import RSWeb
1212
import Secrets
1313

14-
class AccountsFeedbinWindowController: NSWindowController {
14+
final class AccountsFeedbinWindowController: NSWindowController {
1515

1616
@IBOutlet weak var signInTextField: NSTextField!
1717
@IBOutlet weak var noAccountTextField: NSTextField!

Mac/Preferences/Accounts/AccountsNewsBlurWindowController.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import Account
1111
import RSWeb
1212
import Secrets
1313

14-
class AccountsNewsBlurWindowController: NSWindowController {
14+
final class AccountsNewsBlurWindowController: NSWindowController {
1515

1616
@IBOutlet weak var signInTextField: NSTextField!
1717
@IBOutlet weak var noAccountTextField: NSTextField!

Mac/Preferences/Accounts/AccountsReaderAPIWindowController.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import Account
1111
import RSWeb
1212
import Secrets
1313

14-
class AccountsReaderAPIWindowController: NSWindowController {
14+
final class AccountsReaderAPIWindowController: NSWindowController {
1515

1616
@IBOutlet weak var titleImageView: NSImageView!
1717
@IBOutlet weak var titleLabel: NSTextField!

Mac/Preferences/PreferencesWindowController.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ private struct ToolbarItemIdentifier {
2727
static let Advanced = "Advanced"
2828
}
2929

30-
class PreferencesWindowController: NSWindowController, NSToolbarDelegate {
30+
final class PreferencesWindowController: NSWindowController, NSToolbarDelegate {
3131

3232
private let windowWidth = CGFloat(512.0) // Width is constant for all views; only the height changes
3333
private var viewControllers = [String: NSViewController]()

Mac/SafariExtension/SafariExtensionHandler.swift

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
import SafariServices
1010

11-
class SafariExtensionHandler: SFSafariExtensionHandler {
11+
final class SafariExtensionHandler: SFSafariExtensionHandler {
1212

1313
// Safari App Extensions don't support any reasonable means of detecting whether a
1414
// specific Safari page was loaded with the benefit of the extension's injected
@@ -20,7 +20,7 @@ class SafariExtensionHandler: SFSafariExtensionHandler {
2020
// I tried to use a NSMapTable from String to the closure directly, but Swift
2121
// complains that the object has to be a class type.
2222
typealias ValidationHandler = (Bool, String) -> Void
23-
class ValidationWrapper {
23+
final class ValidationWrapper {
2424
let validationHandler: ValidationHandler
2525

2626
init(validationHandler: @escaping ValidationHandler) {

Mac/SafariExtension/SafariExtensionViewController.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
import SafariServices
1010

11-
class SafariExtensionViewController: SFSafariExtensionViewController {
11+
final class SafariExtensionViewController: SFSafariExtensionViewController {
1212

1313
// This would be the place to handle a popover that could, for example, list the possibly multiple feeds offered by a site.
1414
static let shared: SafariExtensionViewController = {

Mac/Scriptability/Account+Scriptability.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import Articles
1212
import RSCore
1313

1414
@objc(ScriptableAccount)
15-
class ScriptableAccount: NSObject, UniqueIdScriptingObject, ScriptingObjectContainer {
15+
final class ScriptableAccount: NSObject, UniqueIdScriptingObject, ScriptingObjectContainer {
1616

1717
let account: Account
1818
init (_ account: Account) {

Mac/Scriptability/AppDelegate+Scriptability.swift

+3-3
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ extension AppDelegate: AppDelegateAppleEvents {
9090
}
9191
}
9292

93-
class NetNewsWireCreateElementCommand: NSCreateCommand {
93+
final class NetNewsWireCreateElementCommand: NSCreateCommand {
9494
override func performDefaultImplementation() -> Any? {
9595
let classDescription = self.createClassDescription
9696
if classDescription.className == "feed" {
@@ -110,7 +110,7 @@ class NetNewsWireCreateElementCommand: NSCreateCommand {
110110
is ambiguity about whether specifiers are lists or single objects, the code switches
111111
based on which it is.
112112
*/
113-
class NetNewsWireDeleteCommand: NSDeleteCommand {
113+
final class NetNewsWireDeleteCommand: NSDeleteCommand {
114114

115115
/*
116116
delete(objectToDelete:, from container:)
@@ -165,7 +165,7 @@ class NetNewsWireDeleteCommand: NSDeleteCommand {
165165
}
166166
}
167167

168-
class NetNewsWireExistsCommand: NSExistsCommand {
168+
final class NetNewsWireExistsCommand: NSExistsCommand {
169169

170170
// cocoa default behavior doesn't work here, because of cases where we define an object's property
171171
// to be another object type. e.g., 'permalink of the current article' parses as

Mac/Scriptability/Article+Scriptability.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import Account
1111
import Articles
1212

1313
@objc(ScriptableArticle)
14-
class ScriptableArticle: NSObject, UniqueIdScriptingObject, ScriptingObjectContainer {
14+
final class ScriptableArticle: NSObject, UniqueIdScriptingObject, ScriptingObjectContainer {
1515

1616
let article: Article
1717
let container: ScriptingObjectContainer

Mac/Scriptability/Author+Scriptability.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import Account
1111
import Articles
1212

1313
@objc(ScriptableAuthor)
14-
class ScriptableAuthor: NSObject, UniqueIdScriptingObject {
14+
final class ScriptableAuthor: NSObject, UniqueIdScriptingObject {
1515

1616
let author: Author
1717
let container: ScriptingObjectContainer

Mac/Scriptability/Folder+Scriptability.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import Articles
1212
import RSCore
1313

1414
@objc(ScriptableFolder)
15-
class ScriptableFolder: NSObject, UniqueIdScriptingObject, ScriptingObjectContainer {
15+
final class ScriptableFolder: NSObject, UniqueIdScriptingObject, ScriptingObjectContainer {
1616

1717
let folder: Folder
1818
let container: ScriptingObjectContainer

Mac/Scriptability/WebFeed+Scriptability.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import Account
1212
import Articles
1313

1414
@objc(ScriptableFeed)
15-
class ScriptableFeed: NSObject, UniqueIdScriptingObject, ScriptingObjectContainer {
15+
final class ScriptableFeed: NSObject, UniqueIdScriptingObject, ScriptingObjectContainer {
1616

1717
let feed: Feed
1818
let container: ScriptingObjectContainer

Mac/ShareExtension/ShareViewController.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import Cocoa
1010
import os.log
1111
import UniformTypeIdentifiers
1212

13-
class ShareViewController: NSViewController {
13+
final class ShareViewController: NSViewController {
1414

1515
@IBOutlet weak var nameTextField: NSTextField!
1616
@IBOutlet weak var folderPopUpButton: NSPopUpButton!

Modules/Account/Sources/Account/CloudKit/CloudKitAccountZoneDelegate.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import CloudKit
1313
import RSCore
1414
import Articles
1515

16-
class CloudKitAcountZoneDelegate: CloudKitZoneDelegate {
16+
final class CloudKitAcountZoneDelegate: CloudKitZoneDelegate {
1717

1818
struct UnclaimedFeed {
1919
let url: URL

Modules/Account/Sources/Account/CloudKit/CloudKitArticlesZoneDelegate.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import SyncDatabase
1616
import Articles
1717
import ArticlesDatabase
1818

19-
class CloudKitArticlesZoneDelegate: CloudKitZoneDelegate {
19+
final class CloudKitArticlesZoneDelegate: CloudKitZoneDelegate {
2020

2121
private var log = OSLog(subsystem: Bundle.main.bundleIdentifier!, category: "CloudKit")
2222

Modules/Account/Sources/Account/CloudKit/CloudKitReceiveStatusOperation.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import Foundation
1010
import os.log
1111
import RSCore
1212

13-
class CloudKitReceiveStatusOperation: MainThreadOperation {
13+
final class CloudKitReceiveStatusOperation: MainThreadOperation {
1414

1515
private var log = OSLog(subsystem: Bundle.main.bundleIdentifier!, category: "CloudKit")
1616

Modules/Account/Sources/Account/CloudKit/CloudKitRemoteNotificationOperation.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import Foundation
1111
import os.log
1212
import RSCore
1313

14-
class CloudKitRemoteNotificationOperation: MainThreadOperation {
14+
final class CloudKitRemoteNotificationOperation: MainThreadOperation {
1515

1616
private var log = OSLog(subsystem: Bundle.main.bundleIdentifier!, category: "CloudKit")
1717

Modules/Account/Sources/Account/CloudKit/CloudKitSendStatusOperation.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import RSCore
1313
import RSWeb
1414
import SyncDatabase
1515

16-
class CloudKitSendStatusOperation: MainThreadOperation {
16+
final class CloudKitSendStatusOperation: MainThreadOperation {
1717

1818
private var log = OSLog(subsystem: Bundle.main.bundleIdentifier!, category: "CloudKit")
1919
private let blockSize = 150

Modules/Account/Sources/Account/FeedFinder/FeedFinder.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import Parser
1111
import RSWeb
1212
import RSCore
1313

14-
class FeedFinder {
14+
final class FeedFinder {
1515

1616
static func find(url: URL, completion: @escaping (Result<Set<FeedSpecifier>, Error>) -> Void) {
1717
Downloader.shared.download(url) { (data, response, error) in

Modules/Account/Sources/Account/FeedFinder/HTMLFeedFinder.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import Parser
1111

1212
private let feedURLWordsToMatch = ["feed", "xml", "rss", "atom", "json"]
1313

14-
class HTMLFeedFinder {
14+
final class HTMLFeedFinder {
1515

1616
var feedSpecifiers: Set<FeedSpecifier> {
1717
return Set(feedSpecifiersDictionary.values)

Modules/Account/Sources/Account/Feedly/Operations/FeedlyAddExistingFeedOperation.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import RSWeb
1212
import RSCore
1313
import Secrets
1414

15-
class FeedlyAddExistingFeedOperation: FeedlyOperation, FeedlyOperationDelegate, FeedlyCheckpointOperationDelegate {
15+
final class FeedlyAddExistingFeedOperation: FeedlyOperation, FeedlyOperationDelegate, FeedlyCheckpointOperationDelegate {
1616

1717
private let operationQueue = MainThreadOperationQueue()
1818
var addCompletionHandler: ((Result<Void, Error>) -> Void)?

0 commit comments

Comments
 (0)