Enable SwiftLint inside of Xcode

This commit also fixes all linter warnings and errors.
This commit is contained in:
Conrad Kramer 2023-05-09 22:06:56 -04:00
parent 941d465570
commit 3c30a4b336
7 changed files with 130 additions and 21 deletions

View file

@ -1,25 +1,24 @@
import NetworkExtension
class PacketTunnelProvider: NEPacketTunnelProvider {
override func startTunnel(options: [String : NSObject]?, completionHandler: @escaping (Error?) -> Void) {
override func startTunnel(options: [String: NSObject]?, completionHandler: @escaping (Error?) -> Void) {
completionHandler(nil)
}
override func stopTunnel(with reason: NEProviderStopReason, completionHandler: @escaping () -> Void) {
completionHandler()
}
override func handleAppMessage(_ messageData: Data, completionHandler: ((Data?) -> Void)?) {
if let handler = completionHandler {
handler(messageData)
}
}
override func sleep(completionHandler: @escaping () -> Void) {
completionHandler()
}
override func wake() {
}
}