aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoopesh Chander <roop@roopc.net>2021-08-02 13:49:47 +0530
committerJason A. Donenfeld <Jason@zx2c4.com>2021-09-22 06:58:14 +0200
commita8226b35d2a9773eed6665438257597e9a4aa711 (patch)
tree53fab7740475a47af8f8ff2ed39a0af22cf84bf1
parentbuild: Fix swift warnings (diff)
downloadwireguard-apple-a8226b35d2a9773eed6665438257597e9a4aa711.tar.xz
wireguard-apple-a8226b35d2a9773eed6665438257597e9a4aa711.zip
build: Fix swiftlint warnings
Signed-off-by: Roopesh Chander <roop@roopc.net>
-rw-r--r--Sources/WireGuardApp/Tunnel/TunnelsManager.swift2
-rw-r--r--Sources/WireGuardApp/UI/iOS/UITableViewCell+Reuse.swift2
-rw-r--r--Sources/WireGuardApp/UI/iOS/ViewController/SSIDOptionEditTableViewController.swift1
-rw-r--r--Sources/WireGuardApp/UI/iOS/ViewController/TunnelEditTableViewController.swift2
-rw-r--r--Sources/WireGuardApp/UI/macOS/Application.swift2
-rw-r--r--Sources/WireGuardApp/UI/macOS/NSTableView+Reuse.swift2
-rw-r--r--Sources/WireGuardApp/UI/macOS/View/ConfTextStorage.swift2
-rw-r--r--Sources/WireGuardApp/UI/macOS/View/ConfTextView.swift2
8 files changed, 7 insertions, 8 deletions
diff --git a/Sources/WireGuardApp/Tunnel/TunnelsManager.swift b/Sources/WireGuardApp/Tunnel/TunnelsManager.swift
index fe3955b..83c48c9 100644
--- a/Sources/WireGuardApp/Tunnel/TunnelsManager.swift
+++ b/Sources/WireGuardApp/Tunnel/TunnelsManager.swift
@@ -236,7 +236,7 @@ class TunnelsManager {
tunnelProviderManager.saveToPreferences { [weak self] error in
if let error = error {
- //TODO: the passwordReference for the old one has already been removed at this point and we can't easily roll back!
+ // TODO: the passwordReference for the old one has already been removed at this point and we can't easily roll back!
wg_log(.error, message: "Modify: Saving configuration failed: \(error)")
completionHandler(TunnelsManagerError.systemErrorOnModifyTunnel(systemError: error))
return
diff --git a/Sources/WireGuardApp/UI/iOS/UITableViewCell+Reuse.swift b/Sources/WireGuardApp/UI/iOS/UITableViewCell+Reuse.swift
index fbe56a1..dc981d2 100644
--- a/Sources/WireGuardApp/UI/iOS/UITableViewCell+Reuse.swift
+++ b/Sources/WireGuardApp/UI/iOS/UITableViewCell+Reuse.swift
@@ -15,7 +15,7 @@ extension UITableView {
}
func dequeueReusableCell<T: UITableViewCell>(for indexPath: IndexPath) -> T {
- //swiftlint:disable:next force_cast
+ // swiftlint:disable:next force_cast
return dequeueReusableCell(withIdentifier: T.reuseIdentifier, for: indexPath) as! T
}
}
diff --git a/Sources/WireGuardApp/UI/iOS/ViewController/SSIDOptionEditTableViewController.swift b/Sources/WireGuardApp/UI/iOS/ViewController/SSIDOptionEditTableViewController.swift
index a3647c3..d32fa8c 100644
--- a/Sources/WireGuardApp/UI/iOS/ViewController/SSIDOptionEditTableViewController.swift
+++ b/Sources/WireGuardApp/UI/iOS/ViewController/SSIDOptionEditTableViewController.swift
@@ -324,4 +324,3 @@ extension SSIDOptionEditTableViewController {
}
}
}
-
diff --git a/Sources/WireGuardApp/UI/iOS/ViewController/TunnelEditTableViewController.swift b/Sources/WireGuardApp/UI/iOS/ViewController/TunnelEditTableViewController.swift
index e4d94d3..e44cf8d 100644
--- a/Sources/WireGuardApp/UI/iOS/ViewController/TunnelEditTableViewController.swift
+++ b/Sources/WireGuardApp/UI/iOS/ViewController/TunnelEditTableViewController.swift
@@ -318,7 +318,7 @@ extension TunnelEditTableViewController {
let removedSectionIndices = self.deletePeer(peer: peerData)
let shouldShowExcludePrivateIPs = (self.tunnelViewModel.peersData.count == 1 && self.tunnelViewModel.peersData[0].shouldAllowExcludePrivateIPsControl)
- //swiftlint:disable:next trailing_closure
+ // swiftlint:disable:next trailing_closure
tableView.performBatchUpdates({
self.tableView.deleteSections(removedSectionIndices, with: .fade)
if shouldShowExcludePrivateIPs {
diff --git a/Sources/WireGuardApp/UI/macOS/Application.swift b/Sources/WireGuardApp/UI/macOS/Application.swift
index c45763f..67d67a7 100644
--- a/Sources/WireGuardApp/UI/macOS/Application.swift
+++ b/Sources/WireGuardApp/UI/macOS/Application.swift
@@ -5,7 +5,7 @@ import Cocoa
class Application: NSApplication {
- private var appDelegate: AppDelegate? //swiftlint:disable:this weak_delegate
+ private var appDelegate: AppDelegate? // swiftlint:disable:this weak_delegate
override init() {
super.init()
diff --git a/Sources/WireGuardApp/UI/macOS/NSTableView+Reuse.swift b/Sources/WireGuardApp/UI/macOS/NSTableView+Reuse.swift
index 5f2e7dd..bdf55ab 100644
--- a/Sources/WireGuardApp/UI/macOS/NSTableView+Reuse.swift
+++ b/Sources/WireGuardApp/UI/macOS/NSTableView+Reuse.swift
@@ -7,7 +7,7 @@ extension NSTableView {
func dequeueReusableCell<T: NSView>() -> T {
let identifier = NSUserInterfaceItemIdentifier(NSStringFromClass(T.self))
if let cellView = makeView(withIdentifier: identifier, owner: self) {
- //swiftlint:disable:next force_cast
+ // swiftlint:disable:next force_cast
return cellView as! T
}
let cellView = T()
diff --git a/Sources/WireGuardApp/UI/macOS/View/ConfTextStorage.swift b/Sources/WireGuardApp/UI/macOS/View/ConfTextStorage.swift
index 7aa1d91..274a137 100644
--- a/Sources/WireGuardApp/UI/macOS/View/ConfTextStorage.swift
+++ b/Sources/WireGuardApp/UI/macOS/View/ConfTextStorage.swift
@@ -16,7 +16,7 @@ class ConfTextStorage: NSTextStorage {
private(set) var hasError = false
private(set) var privateKeyString: String?
- private(set) var hasOnePeer: Bool = false
+ private(set) var hasOnePeer = false
private(set) var lastOnePeerAllowedIPs = [String]()
private(set) var lastOnePeerDNSServers = [String]()
private(set) var lastOnePeerHasPublicKey = false
diff --git a/Sources/WireGuardApp/UI/macOS/View/ConfTextView.swift b/Sources/WireGuardApp/UI/macOS/View/ConfTextView.swift
index bef0885..5d3f3cf 100644
--- a/Sources/WireGuardApp/UI/macOS/View/ConfTextView.swift
+++ b/Sources/WireGuardApp/UI/macOS/View/ConfTextView.swift
@@ -7,7 +7,7 @@ class ConfTextView: NSTextView {
private let confTextStorage = ConfTextStorage()
- @objc dynamic var hasError: Bool = false
+ @objc dynamic var hasError = false
@objc dynamic var privateKeyString: String?
@objc dynamic var singlePeerAllowedIPs: [String]?