Mark classes as final that can be marked as final.
This commit is contained in:
parent
48fc807f94
commit
5651764907
@ -22,7 +22,7 @@ import Sparkle
|
||||
var appDelegate: AppDelegate!
|
||||
|
||||
@NSApplicationMain
|
||||
class AppDelegate: NSObject, NSApplicationDelegate, NSUserInterfaceValidations, UNUserNotificationCenterDelegate, UnreadCountProvider, SPUStandardUserDriverDelegate, SPUUpdaterDelegate {
|
||||
final class AppDelegate: NSObject, NSApplicationDelegate, NSUserInterfaceValidations, UNUserNotificationCenterDelegate, UnreadCountProvider, SPUStandardUserDriverDelegate, SPUUpdaterDelegate {
|
||||
|
||||
private struct WindowRestorationIdentifiers {
|
||||
static let mainWindow = "mainWindow"
|
||||
|
@ -22,7 +22,7 @@ import Parser
|
||||
// Else,
|
||||
// display error sheet.
|
||||
|
||||
class AddFeedController: AddFeedWindowControllerDelegate {
|
||||
final class AddFeedController: AddFeedWindowControllerDelegate {
|
||||
|
||||
private let hostWindow: NSWindow
|
||||
private var addFeedWindowController: AddFeedWindowController?
|
||||
|
@ -11,7 +11,7 @@ import RSCore
|
||||
import RSTree
|
||||
import Account
|
||||
|
||||
class FolderTreeMenu {
|
||||
final class FolderTreeMenu {
|
||||
|
||||
static func createFolderPopupMenu(with rootNode: Node, restrictToSpecialAccounts: Bool = false) -> NSMenu {
|
||||
|
||||
|
@ -10,7 +10,7 @@ import AppKit
|
||||
import Articles
|
||||
import Account
|
||||
|
||||
class AddFolderWindowController: NSWindowController {
|
||||
final class AddFolderWindowController: NSWindowController {
|
||||
|
||||
@IBOutlet var folderNameTextField: NSTextField!
|
||||
@IBOutlet var accountPopupButton: NSPopUpButton!
|
||||
|
@ -15,7 +15,7 @@ enum ArticleExtractorButtonState {
|
||||
case off
|
||||
}
|
||||
|
||||
class ArticleExtractorButton: NSButton {
|
||||
final class ArticleExtractorButton: NSButton {
|
||||
|
||||
private var animatedLayer: CALayer?
|
||||
|
||||
|
@ -8,7 +8,7 @@
|
||||
|
||||
import Foundation
|
||||
|
||||
class LegacyArticleExtractorButton: NSButton {
|
||||
final class LegacyArticleExtractorButton: NSButton {
|
||||
|
||||
var isError = false {
|
||||
didSet {
|
||||
|
@ -16,7 +16,7 @@ enum TimelineSourceMode {
|
||||
case regular, search
|
||||
}
|
||||
|
||||
class MainWindowController: NSWindowController, NSUserInterfaceValidations {
|
||||
final class MainWindowController: NSWindowController, NSUserInterfaceValidations {
|
||||
|
||||
@IBOutlet weak var articleThemePopUpButton: NSPopUpButton?
|
||||
|
||||
|
@ -10,7 +10,7 @@ import AppKit
|
||||
import Account
|
||||
import UniformTypeIdentifiers
|
||||
|
||||
class ExportOPMLWindowController: NSWindowController {
|
||||
final class ExportOPMLWindowController: NSWindowController {
|
||||
|
||||
@IBOutlet weak var accountPopUpButton: NSPopUpButton!
|
||||
private weak var hostWindow: NSWindow?
|
||||
|
@ -10,7 +10,7 @@ import AppKit
|
||||
import Account
|
||||
import UniformTypeIdentifiers
|
||||
|
||||
class ImportOPMLWindowController: NSWindowController {
|
||||
final class ImportOPMLWindowController: NSWindowController {
|
||||
|
||||
@IBOutlet weak var accountPopUpButton: NSPopUpButton!
|
||||
private weak var hostWindow: NSWindow?
|
||||
|
@ -11,7 +11,7 @@ import RSCore
|
||||
import Account
|
||||
import RSTree
|
||||
|
||||
class SidebarCell: NSTableCellView {
|
||||
final class SidebarCell: NSTableCellView {
|
||||
|
||||
var iconImage: IconImage? {
|
||||
didSet {
|
||||
|
@ -10,7 +10,7 @@ import AppKit
|
||||
import RSCore
|
||||
import RSTree
|
||||
|
||||
class SidebarOutlineView: NSOutlineView {
|
||||
final class SidebarOutlineView: NSOutlineView {
|
||||
|
||||
@IBOutlet var keyboardDelegate: KeyboardDelegate!
|
||||
|
||||
|
@ -22,7 +22,7 @@ protocol SidebarDelegate: AnyObject {
|
||||
func sidebarInvalidatedRestorationState(_: SidebarViewController)
|
||||
}
|
||||
|
||||
@objc class SidebarViewController: NSViewController, NSOutlineViewDelegate, NSMenuDelegate, UndoableCommandRunner {
|
||||
@objc final class SidebarViewController: NSViewController, NSOutlineViewDelegate, NSMenuDelegate, UndoableCommandRunner {
|
||||
|
||||
@IBOutlet weak var outlineView: NSOutlineView!
|
||||
|
||||
|
@ -8,7 +8,7 @@
|
||||
|
||||
import AppKit
|
||||
|
||||
class UnreadCountView: NSView {
|
||||
final class UnreadCountView: NSView {
|
||||
|
||||
struct Appearance {
|
||||
static let padding = NSEdgeInsets(top: 1.0, left: 7.0, bottom: 1.0, right: 7.0)
|
||||
|
@ -9,7 +9,7 @@
|
||||
import AppKit
|
||||
import RSCore
|
||||
|
||||
class TimelineTableCellView: NSTableCellView {
|
||||
final class TimelineTableCellView: NSTableCellView {
|
||||
|
||||
private let titleView = TimelineTableCellView.multiLineTextField()
|
||||
private let summaryView = TimelineTableCellView.multiLineTextField()
|
||||
|
@ -8,7 +8,7 @@
|
||||
|
||||
import AppKit
|
||||
|
||||
class UnreadIndicatorView: NSView {
|
||||
final class UnreadIndicatorView: NSView {
|
||||
|
||||
static let unreadCircleDimension: CGFloat = 8.0
|
||||
|
||||
|
@ -8,7 +8,7 @@
|
||||
|
||||
import AppKit
|
||||
|
||||
class TimelineTableRowView: NSTableRowView {
|
||||
final class TimelineTableRowView: NSTableRowView {
|
||||
|
||||
private var separator: NSView?
|
||||
|
||||
|
@ -9,7 +9,7 @@
|
||||
import AppKit
|
||||
import RSCore
|
||||
|
||||
class TimelineTableView: NSTableView {
|
||||
final class TimelineTableView: NSTableView {
|
||||
|
||||
weak var keyboardDelegate: KeyboardDelegate?
|
||||
|
||||
|
@ -8,7 +8,7 @@
|
||||
|
||||
import AppKit
|
||||
|
||||
class AccountCell: NSTableCellView {
|
||||
final class AccountCell: NSTableCellView {
|
||||
|
||||
private var originalImage: NSImage?
|
||||
|
||||
|
@ -17,7 +17,7 @@ enum AccountsAddCloudKitWindowControllerError: LocalizedError {
|
||||
}
|
||||
}
|
||||
|
||||
class AccountsAddCloudKitWindowController: NSWindowController {
|
||||
final class AccountsAddCloudKitWindowController: NSWindowController {
|
||||
|
||||
@IBOutlet weak var limitationsAndSolutionsTextField: NSTextField!
|
||||
|
||||
|
@ -9,7 +9,7 @@
|
||||
import AppKit
|
||||
import Account
|
||||
|
||||
class AccountsAddLocalWindowController: NSWindowController {
|
||||
final class AccountsAddLocalWindowController: NSWindowController {
|
||||
|
||||
@IBOutlet private weak var nameTextField: NSTextField!
|
||||
@IBOutlet private weak var localAccountNameTextField: NSTextField!
|
||||
|
@ -11,7 +11,7 @@ import Account
|
||||
import RSWeb
|
||||
import Secrets
|
||||
|
||||
class AccountsFeedbinWindowController: NSWindowController {
|
||||
final class AccountsFeedbinWindowController: NSWindowController {
|
||||
|
||||
@IBOutlet weak var signInTextField: NSTextField!
|
||||
@IBOutlet weak var noAccountTextField: NSTextField!
|
||||
|
@ -11,7 +11,7 @@ import Account
|
||||
import RSWeb
|
||||
import Secrets
|
||||
|
||||
class AccountsNewsBlurWindowController: NSWindowController {
|
||||
final class AccountsNewsBlurWindowController: NSWindowController {
|
||||
|
||||
@IBOutlet weak var signInTextField: NSTextField!
|
||||
@IBOutlet weak var noAccountTextField: NSTextField!
|
||||
|
@ -11,7 +11,7 @@ import Account
|
||||
import RSWeb
|
||||
import Secrets
|
||||
|
||||
class AccountsReaderAPIWindowController: NSWindowController {
|
||||
final class AccountsReaderAPIWindowController: NSWindowController {
|
||||
|
||||
@IBOutlet weak var titleImageView: NSImageView!
|
||||
@IBOutlet weak var titleLabel: NSTextField!
|
||||
|
@ -27,7 +27,7 @@ private struct ToolbarItemIdentifier {
|
||||
static let Advanced = "Advanced"
|
||||
}
|
||||
|
||||
class PreferencesWindowController: NSWindowController, NSToolbarDelegate {
|
||||
final class PreferencesWindowController: NSWindowController, NSToolbarDelegate {
|
||||
|
||||
private let windowWidth = CGFloat(512.0) // Width is constant for all views; only the height changes
|
||||
private var viewControllers = [String: NSViewController]()
|
||||
|
@ -8,7 +8,7 @@
|
||||
|
||||
import SafariServices
|
||||
|
||||
class SafariExtensionHandler: SFSafariExtensionHandler {
|
||||
final class SafariExtensionHandler: SFSafariExtensionHandler {
|
||||
|
||||
// Safari App Extensions don't support any reasonable means of detecting whether a
|
||||
// specific Safari page was loaded with the benefit of the extension's injected
|
||||
@ -20,7 +20,7 @@ class SafariExtensionHandler: SFSafariExtensionHandler {
|
||||
// I tried to use a NSMapTable from String to the closure directly, but Swift
|
||||
// complains that the object has to be a class type.
|
||||
typealias ValidationHandler = (Bool, String) -> Void
|
||||
class ValidationWrapper {
|
||||
final class ValidationWrapper {
|
||||
let validationHandler: ValidationHandler
|
||||
|
||||
init(validationHandler: @escaping ValidationHandler) {
|
||||
|
@ -8,7 +8,7 @@
|
||||
|
||||
import SafariServices
|
||||
|
||||
class SafariExtensionViewController: SFSafariExtensionViewController {
|
||||
final class SafariExtensionViewController: SFSafariExtensionViewController {
|
||||
|
||||
// This would be the place to handle a popover that could, for example, list the possibly multiple feeds offered by a site.
|
||||
static let shared: SafariExtensionViewController = {
|
||||
|
@ -12,7 +12,7 @@ import Articles
|
||||
import RSCore
|
||||
|
||||
@objc(ScriptableAccount)
|
||||
class ScriptableAccount: NSObject, UniqueIdScriptingObject, ScriptingObjectContainer {
|
||||
final class ScriptableAccount: NSObject, UniqueIdScriptingObject, ScriptingObjectContainer {
|
||||
|
||||
let account: Account
|
||||
init (_ account: Account) {
|
||||
|
@ -90,7 +90,7 @@ extension AppDelegate: AppDelegateAppleEvents {
|
||||
}
|
||||
}
|
||||
|
||||
class NetNewsWireCreateElementCommand: NSCreateCommand {
|
||||
final class NetNewsWireCreateElementCommand: NSCreateCommand {
|
||||
override func performDefaultImplementation() -> Any? {
|
||||
let classDescription = self.createClassDescription
|
||||
if classDescription.className == "feed" {
|
||||
@ -110,7 +110,7 @@ class NetNewsWireCreateElementCommand: NSCreateCommand {
|
||||
is ambiguity about whether specifiers are lists or single objects, the code switches
|
||||
based on which it is.
|
||||
*/
|
||||
class NetNewsWireDeleteCommand: NSDeleteCommand {
|
||||
final class NetNewsWireDeleteCommand: NSDeleteCommand {
|
||||
|
||||
/*
|
||||
delete(objectToDelete:, from container:)
|
||||
@ -165,7 +165,7 @@ class NetNewsWireDeleteCommand: NSDeleteCommand {
|
||||
}
|
||||
}
|
||||
|
||||
class NetNewsWireExistsCommand: NSExistsCommand {
|
||||
final class NetNewsWireExistsCommand: NSExistsCommand {
|
||||
|
||||
// cocoa default behavior doesn't work here, because of cases where we define an object's property
|
||||
// to be another object type. e.g., 'permalink of the current article' parses as
|
||||
|
@ -11,7 +11,7 @@ import Account
|
||||
import Articles
|
||||
|
||||
@objc(ScriptableArticle)
|
||||
class ScriptableArticle: NSObject, UniqueIdScriptingObject, ScriptingObjectContainer {
|
||||
final class ScriptableArticle: NSObject, UniqueIdScriptingObject, ScriptingObjectContainer {
|
||||
|
||||
let article: Article
|
||||
let container: ScriptingObjectContainer
|
||||
|
@ -11,7 +11,7 @@ import Account
|
||||
import Articles
|
||||
|
||||
@objc(ScriptableAuthor)
|
||||
class ScriptableAuthor: NSObject, UniqueIdScriptingObject {
|
||||
final class ScriptableAuthor: NSObject, UniqueIdScriptingObject {
|
||||
|
||||
let author: Author
|
||||
let container: ScriptingObjectContainer
|
||||
|
@ -12,7 +12,7 @@ import Articles
|
||||
import RSCore
|
||||
|
||||
@objc(ScriptableFolder)
|
||||
class ScriptableFolder: NSObject, UniqueIdScriptingObject, ScriptingObjectContainer {
|
||||
final class ScriptableFolder: NSObject, UniqueIdScriptingObject, ScriptingObjectContainer {
|
||||
|
||||
let folder: Folder
|
||||
let container: ScriptingObjectContainer
|
||||
|
@ -12,7 +12,7 @@ import Account
|
||||
import Articles
|
||||
|
||||
@objc(ScriptableFeed)
|
||||
class ScriptableFeed: NSObject, UniqueIdScriptingObject, ScriptingObjectContainer {
|
||||
final class ScriptableFeed: NSObject, UniqueIdScriptingObject, ScriptingObjectContainer {
|
||||
|
||||
let feed: Feed
|
||||
let container: ScriptingObjectContainer
|
||||
|
@ -10,7 +10,7 @@ import Cocoa
|
||||
import os.log
|
||||
import UniformTypeIdentifiers
|
||||
|
||||
class ShareViewController: NSViewController {
|
||||
final class ShareViewController: NSViewController {
|
||||
|
||||
@IBOutlet weak var nameTextField: NSTextField!
|
||||
@IBOutlet weak var folderPopUpButton: NSPopUpButton!
|
||||
|
@ -13,7 +13,7 @@ import CloudKit
|
||||
import RSCore
|
||||
import Articles
|
||||
|
||||
class CloudKitAcountZoneDelegate: CloudKitZoneDelegate {
|
||||
final class CloudKitAcountZoneDelegate: CloudKitZoneDelegate {
|
||||
|
||||
struct UnclaimedFeed {
|
||||
let url: URL
|
||||
|
@ -16,7 +16,7 @@ import SyncDatabase
|
||||
import Articles
|
||||
import ArticlesDatabase
|
||||
|
||||
class CloudKitArticlesZoneDelegate: CloudKitZoneDelegate {
|
||||
final class CloudKitArticlesZoneDelegate: CloudKitZoneDelegate {
|
||||
|
||||
private var log = OSLog(subsystem: Bundle.main.bundleIdentifier!, category: "CloudKit")
|
||||
|
||||
|
@ -10,7 +10,7 @@ import Foundation
|
||||
import os.log
|
||||
import RSCore
|
||||
|
||||
class CloudKitReceiveStatusOperation: MainThreadOperation {
|
||||
final class CloudKitReceiveStatusOperation: MainThreadOperation {
|
||||
|
||||
private var log = OSLog(subsystem: Bundle.main.bundleIdentifier!, category: "CloudKit")
|
||||
|
||||
|
@ -11,7 +11,7 @@ import Foundation
|
||||
import os.log
|
||||
import RSCore
|
||||
|
||||
class CloudKitRemoteNotificationOperation: MainThreadOperation {
|
||||
final class CloudKitRemoteNotificationOperation: MainThreadOperation {
|
||||
|
||||
private var log = OSLog(subsystem: Bundle.main.bundleIdentifier!, category: "CloudKit")
|
||||
|
||||
|
@ -13,7 +13,7 @@ import RSCore
|
||||
import RSWeb
|
||||
import SyncDatabase
|
||||
|
||||
class CloudKitSendStatusOperation: MainThreadOperation {
|
||||
final class CloudKitSendStatusOperation: MainThreadOperation {
|
||||
|
||||
private var log = OSLog(subsystem: Bundle.main.bundleIdentifier!, category: "CloudKit")
|
||||
private let blockSize = 150
|
||||
|
@ -11,7 +11,7 @@ import Parser
|
||||
import RSWeb
|
||||
import RSCore
|
||||
|
||||
class FeedFinder {
|
||||
final class FeedFinder {
|
||||
|
||||
static func find(url: URL, completion: @escaping (Result<Set<FeedSpecifier>, Error>) -> Void) {
|
||||
Downloader.shared.download(url) { (data, response, error) in
|
||||
|
@ -11,7 +11,7 @@ import Parser
|
||||
|
||||
private let feedURLWordsToMatch = ["feed", "xml", "rss", "atom", "json"]
|
||||
|
||||
class HTMLFeedFinder {
|
||||
final class HTMLFeedFinder {
|
||||
|
||||
var feedSpecifiers: Set<FeedSpecifier> {
|
||||
return Set(feedSpecifiersDictionary.values)
|
||||
|
@ -12,7 +12,7 @@ import RSWeb
|
||||
import RSCore
|
||||
import Secrets
|
||||
|
||||
class FeedlyAddExistingFeedOperation: FeedlyOperation, FeedlyOperationDelegate, FeedlyCheckpointOperationDelegate {
|
||||
final class FeedlyAddExistingFeedOperation: FeedlyOperation, FeedlyOperationDelegate, FeedlyCheckpointOperationDelegate {
|
||||
|
||||
private let operationQueue = MainThreadOperationQueue()
|
||||
var addCompletionHandler: ((Result<Void, Error>) -> Void)?
|
||||
|
@ -13,7 +13,7 @@ import RSWeb
|
||||
import RSCore
|
||||
import Secrets
|
||||
|
||||
class FeedlyAddNewFeedOperation: FeedlyOperation, FeedlyOperationDelegate, FeedlySearchOperationDelegate, FeedlyCheckpointOperationDelegate {
|
||||
final class FeedlyAddNewFeedOperation: FeedlyOperation, FeedlyOperationDelegate, FeedlySearchOperationDelegate, FeedlyCheckpointOperationDelegate {
|
||||
|
||||
private let operationQueue = MainThreadOperationQueue()
|
||||
private let folder: Folder
|
||||
|
@ -11,7 +11,7 @@ import os.log
|
||||
import RSCore
|
||||
import RSWeb
|
||||
|
||||
class FeedlyDownloadArticlesOperation: FeedlyOperation {
|
||||
final class FeedlyDownloadArticlesOperation: FeedlyOperation {
|
||||
|
||||
private let account: Account
|
||||
private let log: OSLog
|
||||
|
@ -14,7 +14,7 @@ import Secrets
|
||||
///
|
||||
/// Typically, it pages through the article ids of the global.all stream.
|
||||
/// When all the article ids are collected, it is the responsibility of another operation to download them when appropriate.
|
||||
class FeedlyGetUpdatedArticleIdsOperation: FeedlyOperation, FeedlyEntryIdentifierProviding {
|
||||
final class FeedlyGetUpdatedArticleIdsOperation: FeedlyOperation, FeedlyEntryIdentifierProviding {
|
||||
|
||||
private let account: Account
|
||||
private let resource: FeedlyResourceId
|
||||
|
@ -15,7 +15,7 @@ import Secrets
|
||||
/// Typically, it pages through the article ids of the global.all stream.
|
||||
/// As the article ids are collected, a default read status is created for each.
|
||||
/// So this operation has side effects *for the entire account* it operates on.
|
||||
class FeedlyIngestStreamArticleIdsOperation: FeedlyOperation {
|
||||
final class FeedlyIngestStreamArticleIdsOperation: FeedlyOperation {
|
||||
|
||||
private let account: Account
|
||||
private let resource: FeedlyResourceId
|
||||
|
@ -18,7 +18,7 @@ protocol FeedlySearchOperationDelegate: AnyObject {
|
||||
|
||||
/// Find one and only one feed for a given query (usually, a URL).
|
||||
/// What happens when a feed is found for the URL is delegated to the `searchDelegate`.
|
||||
class FeedlySearchOperation: FeedlyOperation {
|
||||
final class FeedlySearchOperation: FeedlyOperation {
|
||||
|
||||
let query: String
|
||||
let locale: Locale
|
||||
|
@ -11,7 +11,7 @@ import RSWeb
|
||||
@testable import Account
|
||||
import Secrets
|
||||
|
||||
class AccountCredentialsTest: XCTestCase {
|
||||
final class AccountCredentialsTest: XCTestCase {
|
||||
|
||||
private var account: Account!
|
||||
|
||||
|
@ -9,7 +9,7 @@
|
||||
import XCTest
|
||||
@testable import Account
|
||||
|
||||
class AccountFeedbinFolderContentsSyncTest: XCTestCase {
|
||||
final class AccountFeedbinFolderContentsSyncTest: XCTestCase {
|
||||
|
||||
override func setUp() {
|
||||
}
|
||||
|
@ -9,7 +9,7 @@
|
||||
import XCTest
|
||||
@testable import Account
|
||||
|
||||
class AccountFeedbinFolderSyncTest: XCTestCase {
|
||||
final class AccountFeedbinFolderSyncTest: XCTestCase {
|
||||
|
||||
override func setUp() {
|
||||
}
|
||||
|
@ -9,7 +9,7 @@
|
||||
import XCTest
|
||||
@testable import Account
|
||||
|
||||
class AccountFeedbinSyncTest: XCTestCase {
|
||||
final class AccountFeedbinSyncTest: XCTestCase {
|
||||
|
||||
override func setUp() {
|
||||
}
|
||||
|
@ -10,9 +10,9 @@ import XCTest
|
||||
@testable import Account
|
||||
import RSCore
|
||||
|
||||
class FeedlyCheckpointOperationTests: XCTestCase {
|
||||
final class FeedlyCheckpointOperationTests: XCTestCase {
|
||||
|
||||
class TestDelegate: FeedlyCheckpointOperationDelegate {
|
||||
final class TestDelegate: FeedlyCheckpointOperationDelegate {
|
||||
|
||||
var didReachCheckpointExpectation: XCTestExpectation?
|
||||
|
||||
|
@ -9,7 +9,7 @@
|
||||
import XCTest
|
||||
@testable import Account
|
||||
|
||||
class FeedlyCollectionParserTests: XCTestCase {
|
||||
final class FeedlyCollectionParserTests: XCTestCase {
|
||||
|
||||
func testParsing() {
|
||||
let collection = FeedlyCollection(feeds: [], label: "Test Collection", id: "test/collection/1")
|
||||
|
@ -10,7 +10,7 @@ import XCTest
|
||||
@testable import Account
|
||||
import RSCore
|
||||
|
||||
class FeedlyCreateFeedsForCollectionFoldersOperationTests: XCTestCase {
|
||||
final class FeedlyCreateFeedsForCollectionFoldersOperationTests: XCTestCase {
|
||||
|
||||
private var account: Account!
|
||||
private let support = FeedlyTestSupport()
|
||||
@ -27,7 +27,7 @@ class FeedlyCreateFeedsForCollectionFoldersOperationTests: XCTestCase {
|
||||
super.tearDown()
|
||||
}
|
||||
|
||||
class FeedsAndFoldersProvider: FeedlyFeedsAndFoldersProviding {
|
||||
final class FeedsAndFoldersProvider: FeedlyFeedsAndFoldersProviding {
|
||||
var feedsAndFolders = [([FeedlyFeed], Folder)]()
|
||||
}
|
||||
|
||||
|
@ -9,7 +9,7 @@
|
||||
import XCTest
|
||||
@testable import Account
|
||||
|
||||
class FeedlyEntryParserTests: XCTestCase {
|
||||
final class FeedlyEntryParserTests: XCTestCase {
|
||||
|
||||
func testParsing() {
|
||||
let content = FeedlyEntry.Content(content: "Test Content", direction: .leftToRight)
|
||||
|
@ -9,7 +9,7 @@
|
||||
import XCTest
|
||||
@testable import Account
|
||||
|
||||
class FeedlyFeedParserTests: XCTestCase {
|
||||
final class FeedlyFeedParserTests: XCTestCase {
|
||||
|
||||
func testParsing() {
|
||||
let name = "Test Feed"
|
||||
|
@ -11,7 +11,7 @@ import XCTest
|
||||
import os.log
|
||||
import RSCore
|
||||
|
||||
class FeedlyGetCollectionsOperationTests: XCTestCase {
|
||||
final class FeedlyGetCollectionsOperationTests: XCTestCase {
|
||||
|
||||
func testGetCollections() {
|
||||
let support = FeedlyTestSupport()
|
||||
@ -58,7 +58,7 @@ class FeedlyGetCollectionsOperationTests: XCTestCase {
|
||||
|
||||
func testGetCollectionsError() {
|
||||
|
||||
class TestDelegate: FeedlyOperationDelegate {
|
||||
final class TestDelegate: FeedlyOperationDelegate {
|
||||
var errorExpectation: XCTestExpectation?
|
||||
var error: Error?
|
||||
|
||||
|
@ -10,7 +10,7 @@ import XCTest
|
||||
@testable import Account
|
||||
import RSCore
|
||||
|
||||
class FeedlyGetStreamContentsOperationTests: XCTestCase {
|
||||
final class FeedlyGetStreamContentsOperationTests: XCTestCase {
|
||||
|
||||
private var account: Account!
|
||||
private let support = FeedlyTestSupport()
|
||||
|
@ -10,7 +10,7 @@ import XCTest
|
||||
@testable import Account
|
||||
import RSCore
|
||||
|
||||
class FeedlyGetStreamIdsOperationTests: XCTestCase {
|
||||
final class FeedlyGetStreamIdsOperationTests: XCTestCase {
|
||||
|
||||
private var account: Account!
|
||||
private let support = FeedlyTestSupport()
|
||||
|
@ -11,7 +11,7 @@ import XCTest
|
||||
import RSCore
|
||||
import Secrets
|
||||
|
||||
class FeedlyLogoutOperationTests: XCTestCase {
|
||||
final class FeedlyLogoutOperationTests: XCTestCase {
|
||||
|
||||
private var account: Account!
|
||||
private let support = FeedlyTestSupport()
|
||||
@ -36,7 +36,7 @@ class FeedlyLogoutOperationTests: XCTestCase {
|
||||
return (accessToken, refreshToken)
|
||||
}
|
||||
|
||||
class TestFeedlyLogoutService: FeedlyLogoutService {
|
||||
final class TestFeedlyLogoutService: FeedlyLogoutService {
|
||||
var mockResult: Result<Void, Error>?
|
||||
var logoutExpectation: XCTestExpectation?
|
||||
|
||||
@ -123,7 +123,7 @@ class FeedlyLogoutOperationTests: XCTestCase {
|
||||
}
|
||||
}
|
||||
|
||||
class TestLogoutDelegate: FeedlyOperationDelegate {
|
||||
final class TestLogoutDelegate: FeedlyOperationDelegate {
|
||||
var error: Error?
|
||||
var didFailExpectation: XCTestExpectation?
|
||||
|
||||
|
@ -10,7 +10,7 @@ import XCTest
|
||||
@testable import Account
|
||||
import RSCore
|
||||
|
||||
class FeedlyMirrorCollectionsAsFoldersOperationTests: XCTestCase {
|
||||
final class FeedlyMirrorCollectionsAsFoldersOperationTests: XCTestCase {
|
||||
|
||||
private var account: Account!
|
||||
private let support = FeedlyTestSupport()
|
||||
@ -27,7 +27,7 @@ class FeedlyMirrorCollectionsAsFoldersOperationTests: XCTestCase {
|
||||
super.tearDown()
|
||||
}
|
||||
|
||||
class CollectionsProvider: FeedlyCollectionProviding {
|
||||
final class CollectionsProvider: FeedlyCollectionProviding {
|
||||
var collections = [
|
||||
FeedlyCollection(feeds: [], label: "One", id: "collections/1"),
|
||||
FeedlyCollection(feeds: [], label: "Two", id: "collections/2")
|
||||
@ -105,7 +105,7 @@ class FeedlyMirrorCollectionsAsFoldersOperationTests: XCTestCase {
|
||||
XCTAssertTrue(removeFolders.feedsAndFolders.isEmpty)
|
||||
}
|
||||
|
||||
class CollectionsAndFeedsProvider: FeedlyCollectionProviding {
|
||||
final class CollectionsAndFeedsProvider: FeedlyCollectionProviding {
|
||||
var feedsForCollectionOne = [
|
||||
FeedlyFeed(id: "feed/1", title: "Feed One", updated: nil, website: nil),
|
||||
FeedlyFeed(id: "feed/2", title: "Feed Two", updated: nil, website: nil)
|
||||
|
@ -11,7 +11,7 @@ import XCTest
|
||||
import RSWeb
|
||||
import RSCore
|
||||
|
||||
class FeedlyOperationTests: XCTestCase {
|
||||
final class FeedlyOperationTests: XCTestCase {
|
||||
|
||||
enum TestOperationError: Error, Equatable {
|
||||
case mockError
|
||||
|
@ -11,7 +11,7 @@ import XCTest
|
||||
import Parser
|
||||
import RSCore
|
||||
|
||||
class FeedlyOrganiseParsedItemsByFeedOperationTests: XCTestCase {
|
||||
final class FeedlyOrganiseParsedItemsByFeedOperationTests: XCTestCase {
|
||||
|
||||
private var account: Account!
|
||||
private let support = FeedlyTestSupport()
|
||||
|
@ -12,7 +12,7 @@ import RSWeb
|
||||
import RSCore
|
||||
import Secrets
|
||||
|
||||
class FeedlyRefreshAccessTokenOperationTests: XCTestCase {
|
||||
final class FeedlyRefreshAccessTokenOperationTests: XCTestCase {
|
||||
|
||||
private var account: Account!
|
||||
private let support = FeedlyTestSupport()
|
||||
@ -29,7 +29,7 @@ class FeedlyRefreshAccessTokenOperationTests: XCTestCase {
|
||||
super.tearDown()
|
||||
}
|
||||
|
||||
class TestRefreshTokenService: OAuthAccessTokenRefreshing {
|
||||
final class TestRefreshTokenService: OAuthAccessTokenRefreshing {
|
||||
var mockResult: Result<OAuthAuthorizationGrant, Error>?
|
||||
var refreshAccessTokenExpectation: XCTestExpectation?
|
||||
var parameterTester: ((String, OAuthAuthorizationClient) -> Void)?
|
||||
@ -71,7 +71,7 @@ class FeedlyRefreshAccessTokenOperationTests: XCTestCase {
|
||||
XCTAssertTrue(refresh.isCanceled)
|
||||
}
|
||||
|
||||
class TestRefreshTokenDelegate: FeedlyOperationDelegate {
|
||||
final class TestRefreshTokenDelegate: FeedlyOperationDelegate {
|
||||
var error: Error?
|
||||
var didFailExpectation: XCTestExpectation?
|
||||
|
||||
|
@ -9,7 +9,7 @@
|
||||
import XCTest
|
||||
@testable import Account
|
||||
|
||||
class FeedlyResourceIdTests: XCTestCase {
|
||||
final class FeedlyResourceIdTests: XCTestCase {
|
||||
|
||||
func testFeedResourceId() {
|
||||
let expectedUrl = "http://ranchero.com/blog/atom.xml"
|
||||
|
@ -12,7 +12,7 @@ import SyncDatabase
|
||||
import Articles
|
||||
import RSCore
|
||||
|
||||
class FeedlySendArticleStatusesOperationTests: XCTestCase {
|
||||
final class FeedlySendArticleStatusesOperationTests: XCTestCase {
|
||||
|
||||
private var account: Account!
|
||||
private let support = FeedlyTestSupport()
|
||||
|
@ -8,7 +8,7 @@
|
||||
|
||||
import Foundation
|
||||
|
||||
class FeedlyMockResponseProvider: TestTransportMockResponseProviding {
|
||||
final class FeedlyMockResponseProvider: TestTransportMockResponseProviding {
|
||||
|
||||
let subdirectory: String
|
||||
|
||||
|
@ -10,7 +10,7 @@ import XCTest
|
||||
@testable import Account
|
||||
import RSCore
|
||||
|
||||
class FeedlySyncStreamContentsOperationTests: XCTestCase {
|
||||
final class FeedlySyncStreamContentsOperationTests: XCTestCase {
|
||||
|
||||
private var account: Account!
|
||||
private let support = FeedlyTestSupport()
|
||||
|
@ -13,7 +13,7 @@ import Secrets
|
||||
import os.log
|
||||
import SyncDatabase
|
||||
|
||||
class FeedlyTestSupport {
|
||||
final class FeedlyTestSupport {
|
||||
var log = OSLog(subsystem: Bundle.main.bundleIdentifier!, category: "FeedlyTests")
|
||||
var accessToken = Credentials(type: .oauthAccessToken, username: "Test", secret: "t3st-access-tok3n")
|
||||
var refreshToken = Credentials(type: .oauthRefreshToken, username: "Test", secret: "t3st-refresh-tok3n")
|
||||
@ -54,7 +54,7 @@ class FeedlyTestSupport {
|
||||
return TestDatabaseContainer()
|
||||
}
|
||||
|
||||
class TestDatabaseContainer {
|
||||
final class TestDatabaseContainer {
|
||||
private let path: String
|
||||
private(set) var database: SyncDatabase!
|
||||
|
||||
|
@ -9,7 +9,7 @@
|
||||
import XCTest
|
||||
@testable import Account
|
||||
|
||||
class FeedlyTextSanitizationTests: XCTestCase {
|
||||
final class FeedlyTextSanitizationTests: XCTestCase {
|
||||
|
||||
func testRTLSanitization() {
|
||||
|
||||
|
@ -9,7 +9,7 @@
|
||||
import XCTest
|
||||
@testable import Account
|
||||
|
||||
class TestMarkArticlesService: FeedlyMarkArticlesService {
|
||||
final class TestMarkArticlesService: FeedlyMarkArticlesService {
|
||||
|
||||
var didMarkExpectation: XCTestExpectation?
|
||||
var parameterTester: ((Set<String>, FeedlyMarkAction) -> Void)?
|
||||
|
@ -11,7 +11,7 @@ import RSWeb
|
||||
|
||||
@testable import Account
|
||||
|
||||
class TestAccountManager {
|
||||
final class TestAccountManager {
|
||||
|
||||
static let shared = TestAccountManager()
|
||||
|
||||
|
@ -9,7 +9,7 @@
|
||||
#if os(macOS)
|
||||
import Cocoa
|
||||
|
||||
public class RSAppMovementMonitor: NSObject {
|
||||
public final class RSAppMovementMonitor: NSObject {
|
||||
|
||||
// If provided, the handler will be consulted when the app is moved.
|
||||
// Return true to indicate that the default handler should be invoked.
|
||||
|
@ -8,7 +8,7 @@
|
||||
#if os(macOS)
|
||||
import AppKit
|
||||
|
||||
class RSDarkModeAdaptingToolbarButton: NSButton {
|
||||
final class RSDarkModeAdaptingToolbarButton: NSButton {
|
||||
// Clients probably should not bother using this class unless they want
|
||||
// to force the template in dark mode, but if you are using this in a more
|
||||
// general context where you want to control and/or override it on a
|
||||
|
@ -8,7 +8,7 @@
|
||||
#if os(macOS)
|
||||
import AppKit
|
||||
|
||||
public class RSToolbarItem: NSToolbarItem {
|
||||
public final class RSToolbarItem: NSToolbarItem {
|
||||
|
||||
override public func validate() {
|
||||
|
||||
|
@ -9,7 +9,7 @@
|
||||
import XCTest
|
||||
@testable import RSCore
|
||||
|
||||
class MacroProcessorTests: XCTestCase {
|
||||
final class MacroProcessorTests: XCTestCase {
|
||||
let substitutions = ["one": "1", "two": "2"]
|
||||
|
||||
func testMacroProcessor() {
|
||||
|
@ -9,7 +9,7 @@
|
||||
import XCTest
|
||||
@testable import RSCore
|
||||
|
||||
class MainThreadOperationTests: XCTestCase {
|
||||
final class MainThreadOperationTests: XCTestCase {
|
||||
|
||||
func testSingleOperation() {
|
||||
let queue = MainThreadOperationQueue()
|
||||
|
@ -8,7 +8,7 @@
|
||||
|
||||
import XCTest
|
||||
|
||||
class StringRSCore: XCTestCase {
|
||||
final class StringRSCore: XCTestCase {
|
||||
|
||||
func testCollapsingWhitespace() {
|
||||
|
||||
|
@ -33,7 +33,7 @@ public enum ReachabilityError: Error {
|
||||
case unableToGetFlags(Int32)
|
||||
}
|
||||
|
||||
public class Reachability {
|
||||
public final class Reachability {
|
||||
|
||||
/// Returns true if the internet is reachable.
|
||||
///
|
||||
|
@ -8,7 +8,7 @@
|
||||
|
||||
import XCTest
|
||||
|
||||
class DictionaryTests: XCTestCase {
|
||||
final class DictionaryTests: XCTestCase {
|
||||
|
||||
func testSimpleQueryString() {
|
||||
|
||||
|
@ -9,7 +9,7 @@
|
||||
import XCTest
|
||||
@testable import RSWeb
|
||||
|
||||
class RSWebTests: XCTestCase {
|
||||
final class RSWebTests: XCTestCase {
|
||||
|
||||
func testExample() {
|
||||
// This is an example of a functional test case.
|
||||
|
@ -8,7 +8,7 @@
|
||||
|
||||
import XCTest
|
||||
|
||||
class StringTests: XCTestCase {
|
||||
final class StringTests: XCTestCase {
|
||||
|
||||
func testHTMLEscaping() {
|
||||
|
||||
|
@ -15,7 +15,7 @@ import Articles
|
||||
import Intents
|
||||
import UniformTypeIdentifiers
|
||||
|
||||
class ActivityManager {
|
||||
final class ActivityManager {
|
||||
|
||||
private var nextUnreadActivity: NSUserActivity?
|
||||
private var selectingActivity: NSUserActivity?
|
||||
|
@ -23,7 +23,7 @@ protocol ArticleExtractorDelegate: AnyObject {
|
||||
func articleExtractionDidComplete(extractedArticle: ExtractedArticle)
|
||||
}
|
||||
|
||||
class ArticleExtractor {
|
||||
final class ArticleExtractor {
|
||||
|
||||
private var dataTask: URLSessionDataTask?
|
||||
|
||||
|
@ -38,7 +38,7 @@ extension RSImage {
|
||||
|
||||
// MARK: - IconScalerQueue
|
||||
|
||||
private class IconScalerQueue {
|
||||
private final class IconScalerQueue {
|
||||
|
||||
static let shared = IconScalerQueue()
|
||||
|
||||
|
@ -16,7 +16,7 @@ import WatchKit
|
||||
import AppKit
|
||||
#endif
|
||||
|
||||
public class ColorHash {
|
||||
public final class ColorHash {
|
||||
|
||||
public static let defaultSaturation = [CGFloat(0.35), CGFloat(0.5), CGFloat(0.65)]
|
||||
public static let defaultBrightness = [CGFloat(0.5), CGFloat(0.65), CGFloat(0.80)]
|
||||
|
@ -10,7 +10,7 @@ import Foundation
|
||||
import Account
|
||||
import Articles
|
||||
|
||||
class IconImageCache {
|
||||
final class IconImageCache {
|
||||
|
||||
static var shared = IconImageCache()
|
||||
|
||||
|
@ -9,7 +9,7 @@
|
||||
import Foundation
|
||||
import Account
|
||||
|
||||
class ArticleStatusSyncTimer {
|
||||
final class ArticleStatusSyncTimer {
|
||||
|
||||
private static let intervalSeconds = Double(120)
|
||||
|
||||
|
@ -8,7 +8,7 @@
|
||||
|
||||
import XCTest
|
||||
|
||||
class NetNewsWire-iOSTests: XCTestCase {
|
||||
final class NetNewsWire-iOSTests: XCTestCase {
|
||||
|
||||
func testExample() {
|
||||
// This is an example of a functional test case.
|
||||
|
@ -12,7 +12,7 @@ import XCTest
|
||||
|
||||
@testable import NetNewsWire
|
||||
|
||||
class ArticleSorterTests: XCTestCase {
|
||||
final class ArticleSorterTests: XCTestCase {
|
||||
|
||||
// MARK: sortByDate ascending tests
|
||||
|
||||
|
@ -8,7 +8,7 @@
|
||||
|
||||
import XCTest
|
||||
|
||||
class AppleScriptXCTestCase: XCTestCase {
|
||||
final class AppleScriptXCTestCase: XCTestCase {
|
||||
|
||||
/*
|
||||
@function doIndividualScript
|
||||
|
@ -8,7 +8,7 @@
|
||||
|
||||
import XCTest
|
||||
|
||||
class ScriptingTests: AppleScriptXCTestCase {
|
||||
final class ScriptingTests: AppleScriptXCTestCase {
|
||||
|
||||
/*
|
||||
@function testGenericScript
|
||||
|
@ -11,7 +11,7 @@ import XCTest
|
||||
|
||||
@testable import NetNewsWire
|
||||
|
||||
class SharingTests: XCTestCase {
|
||||
final class SharingTests: XCTestCase {
|
||||
|
||||
func testSharingSubject() {
|
||||
let sharingServiceDelegate = SharingServiceDelegate(nil)
|
||||
|
@ -18,7 +18,7 @@ enum CloudKitAccountViewControllerError: LocalizedError {
|
||||
}
|
||||
}
|
||||
|
||||
class CloudKitAccountViewController: UITableViewController {
|
||||
final class CloudKitAccountViewController: UITableViewController {
|
||||
|
||||
weak var delegate: AddAccountDismissDelegate?
|
||||
@IBOutlet weak var footerLabel: UILabel!
|
||||
|
@ -12,7 +12,7 @@ import Secrets
|
||||
import RSWeb
|
||||
import SafariServices
|
||||
|
||||
class FeedbinAccountViewController: UITableViewController {
|
||||
final class FeedbinAccountViewController: UITableViewController {
|
||||
|
||||
@IBOutlet weak var activityIndicator: UIActivityIndicatorView!
|
||||
@IBOutlet weak var cancelBarButtonItem: UIBarButtonItem!
|
||||
|
@ -9,7 +9,7 @@
|
||||
import UIKit
|
||||
import Account
|
||||
|
||||
class LocalAccountViewController: UITableViewController {
|
||||
final class LocalAccountViewController: UITableViewController {
|
||||
|
||||
@IBOutlet weak var nameTextField: UITextField!
|
||||
@IBOutlet weak var footerLabel: UILabel!
|
||||
|
@ -12,7 +12,7 @@ import Secrets
|
||||
import RSWeb
|
||||
import SafariServices
|
||||
|
||||
class NewsBlurAccountViewController: UITableViewController {
|
||||
final class NewsBlurAccountViewController: UITableViewController {
|
||||
|
||||
@IBOutlet weak var activityIndicator: UIActivityIndicatorView!
|
||||
@IBOutlet weak var cancelBarButtonItem: UIBarButtonItem!
|
||||
|
@ -12,7 +12,7 @@ import Secrets
|
||||
import RSWeb
|
||||
import SafariServices
|
||||
|
||||
class ReaderAPIAccountViewController: UITableViewController {
|
||||
final class ReaderAPIAccountViewController: UITableViewController {
|
||||
|
||||
@IBOutlet weak var activityIndicator: UIActivityIndicatorView!
|
||||
@IBOutlet weak var cancelBarButtonItem: UIBarButtonItem!
|
||||
|
@ -8,7 +8,7 @@
|
||||
|
||||
import UIKit
|
||||
|
||||
class AddComboTableViewCell: VibrantTableViewCell {
|
||||
final class AddComboTableViewCell: VibrantTableViewCell {
|
||||
|
||||
@IBOutlet weak var icon: UIImageView!
|
||||
@IBOutlet weak var label: UILabel!
|
||||
|
@ -14,7 +14,7 @@ protocol AddFeedFolderViewControllerDelegate: AnyObject {
|
||||
func didSelect(container: Container)
|
||||
}
|
||||
|
||||
class AddFeedFolderViewController: UITableViewController {
|
||||
final class AddFeedFolderViewController: UITableViewController {
|
||||
|
||||
weak var delegate: AddFeedFolderViewControllerDelegate?
|
||||
var initialContainer: Container?
|
||||
|
@ -8,7 +8,7 @@
|
||||
|
||||
import UIKit
|
||||
|
||||
class AddFeedSelectFolderTableViewCell: VibrantTableViewCell {
|
||||
final class AddFeedSelectFolderTableViewCell: VibrantTableViewCell {
|
||||
|
||||
@IBOutlet weak var folderLabel: UILabel!
|
||||
@IBOutlet weak var detailLabel: UILabel!
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user