Skip to content

Commit 29c977a

Browse files
authored
Fix Run SwiftLint autocorrect build phase not working (#404)
* Fix `Run SwiftLint autocorrect` build phase not working Below are the logs: Linting Swift files at paths autocorrect Error: No lintable files found at paths: 'autocorrect' Command PhaseScriptExecution failed with a nonzero exit code * Add changes fixed by SwiftLint
1 parent 98a7b20 commit 29c977a

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

PusherSwift.xcodeproj/project.pbxproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -560,7 +560,7 @@
560560
);
561561
runOnlyForDeploymentPostprocessing = 0;
562562
shellPath = /bin/sh;
563-
shellScript = "if which swiftlint >/dev/null; then\n swiftlint autocorrect\nelse\n echo \"warning: SwiftLint not installed, download from https://github.com/realm/SwiftLint\"\nfi\n";
563+
shellScript = "if which swiftlint >/dev/null; then\n swiftlint --fix\nelse\n echo \"warning: SwiftLint not installed, download from https://github.com/realm/SwiftLint\"\nfi\n";
564564
};
565565
/* End PBXShellScriptBuildPhase section */
566566

Sources/Models/PusherChannel.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,12 @@ open class PusherChannel: NSObject {
1515
eventHandlersQueue.async(flags: .barrier) { self.eventHandlersInternal = newValue }
1616
}
1717
}
18-
19-
private var _subscriptionCount: Int? = nil
18+
19+
private var _subscriptionCount: Int?
2020
public var subscriptionCount: Int? {
2121
get { return _subscriptionCount }
2222
}
23-
23+
2424
open var subscribed = false
2525
public let name: String
2626
open weak var connection: PusherConnection?
@@ -59,7 +59,7 @@ open class PusherChannel: NSObject {
5959
self.type = PusherChannelType(name: name)
6060
self.onSubscriptionCountChanged = onSubscriptionCountChanged
6161
}
62-
62+
6363
internal func updateSubscriptionCount(count: Int) {
6464
self._subscriptionCount = count
6565
self.onSubscriptionCountChanged?(count)

Sources/PusherSwift.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ let CLIENT_NAME = "pusher-websocket-swift"
99
@objcMembers
1010
@objc open class Pusher: NSObject {
1111
public let connection: PusherConnection
12-
open weak var delegate: PusherDelegate? = nil {
12+
open weak var delegate: PusherDelegate? {
1313
willSet {
1414
self.connection.delegate = newValue
1515
}

Sources/Services/PusherConnection.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import NWWebSocket
1818
open var reconnectAttemptsMax: Int?
1919
open var reconnectAttempts: Int = 0
2020
open var maxReconnectGapInSeconds: Double? = 120
21-
open weak var delegate: PusherDelegate? = nil {
21+
open weak var delegate: PusherDelegate? {
2222
// Set the delegate for logging purposes via `debugLog(message:)`
2323
didSet {
2424
Logger.shared.delegate = self.delegate

0 commit comments

Comments
 (0)