Fix lint issues.
This commit is contained in:
parent
9bf4fea962
commit
f1640d8d09
@ -23,6 +23,8 @@ disabled_rules:
|
|||||||
- generic_type_name
|
- generic_type_name
|
||||||
- function_body_length
|
- function_body_length
|
||||||
- type_body_length
|
- type_body_length
|
||||||
|
- function_parameter_count
|
||||||
|
- line_length
|
||||||
|
|
||||||
excluded:
|
excluded:
|
||||||
- Modules/Secrets/Sources/Secrets/SecretKey.swift
|
- Modules/Secrets/Sources/Secrets/SecretKey.swift
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
|
|
||||||
import AppKit
|
import AppKit
|
||||||
|
|
||||||
protocol RenameWindowControllerDelegate {
|
protocol RenameWindowControllerDelegate: AnyObject {
|
||||||
|
|
||||||
func renameWindowController(_ windowController: RenameWindowController, didRenameObject: Any, withNewName: String)
|
func renameWindowController(_ windowController: RenameWindowController, didRenameObject: Any, withNewName: String)
|
||||||
}
|
}
|
||||||
@ -21,7 +21,7 @@ final class RenameWindowController: NSWindowController {
|
|||||||
|
|
||||||
private var originalTitle: String?
|
private var originalTitle: String?
|
||||||
private var representedObject: Any?
|
private var representedObject: Any?
|
||||||
private var delegate: RenameWindowControllerDelegate?
|
private weak var delegate: RenameWindowControllerDelegate?
|
||||||
|
|
||||||
convenience init(originalTitle: String, representedObject: Any, delegate: RenameWindowControllerDelegate) {
|
convenience init(originalTitle: String, representedObject: Any, delegate: RenameWindowControllerDelegate) {
|
||||||
|
|
||||||
|
@ -215,7 +215,7 @@ private extension SidebarViewController {
|
|||||||
menu.addItem(NSMenuItem.separator())
|
menu.addItem(NSMenuItem.separator())
|
||||||
}
|
}
|
||||||
|
|
||||||
if let homePageURL = feed.homePageURL, let _ = URL(string: homePageURL) {
|
if let homePageURL = feed.homePageURL, URL(string: homePageURL) != nil {
|
||||||
let item = menuItem(NSLocalizedString("Open Home Page", comment: "Command"), #selector(openHomePageFromContextualMenu(_:)), homePageURL)
|
let item = menuItem(NSLocalizedString("Open Home Page", comment: "Command"), #selector(openHomePageFromContextualMenu(_:)), homePageURL)
|
||||||
menu.addItem(item)
|
menu.addItem(item)
|
||||||
menu.addItem(NSMenuItem.separator())
|
menu.addItem(NSMenuItem.separator())
|
||||||
|
@ -231,7 +231,7 @@ class ReaderAPIAccountViewController: UITableViewController {
|
|||||||
showError(NSLocalizedString("Username, password, and API URL are required.", comment: "Credentials Error"))
|
showError(NSLocalizedString("Username, password, and API URL are required.", comment: "Credentials Error"))
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
guard let _ = URL(string: apiURLTextField.text!) else {
|
guard URL(string: apiURLTextField.text!) != nil else {
|
||||||
showError(NSLocalizedString("Invalid API URL.", comment: "Invalid API URL"))
|
showError(NSLocalizedString("Invalid API URL.", comment: "Invalid API URL"))
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
@ -14,10 +14,12 @@ import SafariServices
|
|||||||
|
|
||||||
class ArticleViewController: UIViewController {
|
class ArticleViewController: UIViewController {
|
||||||
|
|
||||||
typealias State = (extractedArticle: ExtractedArticle?,
|
struct State {
|
||||||
isShowingExtractedArticle: Bool,
|
let extractedArticle: ExtractedArticle?
|
||||||
articleExtractorButtonState: ArticleExtractorButtonState,
|
let isShowingExtractedArticle: Bool
|
||||||
windowScrollY: Int)
|
let articleExtractorButtonState: ArticleExtractorButtonState
|
||||||
|
let windowScrollY: Int
|
||||||
|
}
|
||||||
|
|
||||||
@IBOutlet private weak var nextUnreadBarButtonItem: UIBarButtonItem!
|
@IBOutlet private weak var nextUnreadBarButtonItem: UIBarButtonItem!
|
||||||
@IBOutlet private weak var prevArticleBarButtonItem: UIBarButtonItem!
|
@IBOutlet private weak var prevArticleBarButtonItem: UIBarButtonItem!
|
||||||
@ -360,8 +362,7 @@ public extension Notification.Name {
|
|||||||
extension ArticleViewController: SearchBarDelegate {
|
extension ArticleViewController: SearchBarDelegate {
|
||||||
|
|
||||||
func searchBar(_ searchBar: ArticleSearchBar, textDidChange searchText: String) {
|
func searchBar(_ searchBar: ArticleSearchBar, textDidChange searchText: String) {
|
||||||
currentWebViewController?.searchText(searchText) {
|
currentWebViewController?.searchText(searchText) { found in
|
||||||
found in
|
|
||||||
searchBar.resultsCount = found.count
|
searchBar.resultsCount = found.count
|
||||||
|
|
||||||
if let index = found.index {
|
if let index = found.index {
|
||||||
|
@ -835,8 +835,7 @@ extension WebViewController {
|
|||||||
}
|
}
|
||||||
let encoded = json.base64EncodedString()
|
let encoded = json.base64EncodedString()
|
||||||
|
|
||||||
webView?.evaluateJavaScript("updateFind(\"\(encoded)\")") {
|
webView?.evaluateJavaScript("updateFind(\"\(encoded)\")") { (result, error) in
|
||||||
(result, error) in
|
|
||||||
guard error == nil,
|
guard error == nil,
|
||||||
let b64 = result as? String,
|
let b64 = result as? String,
|
||||||
let rawData = Data(base64Encoded: b64),
|
let rawData = Data(base64Encoded: b64),
|
||||||
|
@ -43,7 +43,7 @@ class SceneDelegate: UIResponder, UIWindowSceneDelegate {
|
|||||||
|
|
||||||
NotificationCenter.default.addObserver(self, selector: #selector(userDefaultsDidChange), name: UserDefaults.didChangeNotification, object: nil)
|
NotificationCenter.default.addObserver(self, selector: #selector(userDefaultsDidChange), name: UserDefaults.didChangeNotification, object: nil)
|
||||||
|
|
||||||
if let _ = connectionOptions.urlContexts.first?.url {
|
if connectionOptions.urlContexts.first?.url != nil {
|
||||||
self.scene(scene, openURLContexts: connectionOptions.urlContexts)
|
self.scene(scene, openURLContexts: connectionOptions.urlContexts)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user