Skip to content

Commit

Permalink
Fix Run SwiftLint autocorrect build phase not working (#404)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
kardeslik committed May 19, 2023
1 parent 98a7b20 commit 29c977a
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion PusherSwift.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -560,7 +560,7 @@
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
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";
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";
};
/* End PBXShellScriptBuildPhase section */

Expand Down
8 changes: 4 additions & 4 deletions Sources/Models/PusherChannel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@ open class PusherChannel: NSObject {
eventHandlersQueue.async(flags: .barrier) { self.eventHandlersInternal = newValue }
}
}
private var _subscriptionCount: Int? = nil

private var _subscriptionCount: Int?
public var subscriptionCount: Int? {
get { return _subscriptionCount }
}

open var subscribed = false
public let name: String
open weak var connection: PusherConnection?
Expand Down Expand Up @@ -59,7 +59,7 @@ open class PusherChannel: NSObject {
self.type = PusherChannelType(name: name)
self.onSubscriptionCountChanged = onSubscriptionCountChanged
}

internal func updateSubscriptionCount(count: Int) {
self._subscriptionCount = count
self.onSubscriptionCountChanged?(count)
Expand Down
2 changes: 1 addition & 1 deletion Sources/PusherSwift.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ let CLIENT_NAME = "pusher-websocket-swift"
@objcMembers
@objc open class Pusher: NSObject {
public let connection: PusherConnection
open weak var delegate: PusherDelegate? = nil {
open weak var delegate: PusherDelegate? {
willSet {
self.connection.delegate = newValue
}
Expand Down
2 changes: 1 addition & 1 deletion Sources/Services/PusherConnection.swift
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import NWWebSocket
open var reconnectAttemptsMax: Int?
open var reconnectAttempts: Int = 0
open var maxReconnectGapInSeconds: Double? = 120
open weak var delegate: PusherDelegate? = nil {
open weak var delegate: PusherDelegate? {
// Set the delegate for logging purposes via `debugLog(message:)`
didSet {
Logger.shared.delegate = self.delegate
Expand Down

0 comments on commit 29c977a

Please sign in to comment.