diff --git a/.github/workflows/swift.yml b/.github/workflows/swift.yml index aab43c0..7e89f3b 100644 --- a/.github/workflows/swift.yml +++ b/.github/workflows/swift.yml @@ -20,11 +20,11 @@ jobs: steps: - name: Checkout source uses: actions/checkout@v6 - - name: Download swiftlint binary + - name: Resolve package dependencies run: swift package resolve - name: Lint run: > - "$(find ".build/artifacts/swiftlint" -path "*macos*" -type f -name swiftlint -perm +111 -print -quit)" + swift package plugin --allow-writing-to-package-directory swiftlint -- lint --strict --reporter github-actions-logging - name: Resolve package dependencies run: xcodebuild -resolvePackageDependencies diff --git a/Package.resolved b/Package.resolved index effe6b7..490286a 100644 --- a/Package.resolved +++ b/Package.resolved @@ -1,5 +1,5 @@ { - "originHash" : "facaa86ff36cdb3cd199780433b8860493df26d4bfd2f6078987ba96c2a795b8", + "originHash" : "cd95f9d6fd4a97c2f4eb7204ad869cf18e9a6c5c95101e3a2d7dbb3a1338234b", "pins" : [ { "identity" : "codextended", @@ -10,42 +10,6 @@ "version" : "0.3.0" } }, - { - "identity" : "collectionconcurrencykit", - "kind" : "remoteSourceControl", - "location" : "https://github.com/JohnSundell/CollectionConcurrencyKit.git", - "state" : { - "revision" : "b4f23e24b5a1bff301efc5e70871083ca029ff95", - "version" : "0.2.0" - } - }, - { - "identity" : "cryptoswift", - "kind" : "remoteSourceControl", - "location" : "https://github.com/krzyzanowskim/CryptoSwift.git", - "state" : { - "revision" : "e45a26384239e028ec87fbcc788f513b67e10d8f", - "version" : "1.9.0" - } - }, - { - "identity" : "cwlcatchexception", - "kind" : "remoteSourceControl", - "location" : "https://github.com/mattgallagher/CwlCatchException.git", - "state" : { - "revision" : "07b2ba21d361c223e25e3c1e924288742923f08c", - "version" : "2.2.1" - } - }, - { - "identity" : "cwlpreconditiontesting", - "kind" : "remoteSourceControl", - "location" : "https://github.com/mattgallagher/CwlPreconditionTesting.git", - "state" : { - "revision" : "0139c665ebb45e6a9fbdb68aabfd7c39f3fe0071", - "version" : "2.2.2" - } - }, { "identity" : "needle", "kind" : "remoteSourceControl", @@ -55,22 +19,13 @@ "version" : "0.25.1" } }, - { - "identity" : "nimble", - "kind" : "remoteSourceControl", - "location" : "https://github.com/Quick/Nimble.git", - "state" : { - "revision" : "035b88ad6ae8035f5ce2b50b0a6d69c3b16d2120", - "version" : "14.0.0" - } - }, { "identity" : "nodes", "kind" : "remoteSourceControl", "location" : "https://github.com/Tinder/Nodes.git", "state" : { - "revision" : "ced157cbc3df4e9cce9945aca100232eb4b4ce82", - "version" : "0.0.44" + "revision" : "b8b561ddc9c3b81a3ec9f864b99588c8d75d8b12", + "version" : "0.0.45" } }, { @@ -91,15 +46,6 @@ "version" : "16.1.1" } }, - { - "identity" : "sourcekitten", - "kind" : "remoteSourceControl", - "location" : "https://github.com/jpsim/SourceKitten.git", - "state" : { - "revision" : "453f75b8a3bb2c3596c0d2dd422c289788233a22", - "version" : "0.37.1" - } - }, { "identity" : "spectre", "kind" : "remoteSourceControl", @@ -137,41 +83,14 @@ } }, { - "identity" : "swift-syntax", - "kind" : "remoteSourceControl", - "location" : "https://github.com/swiftlang/swift-syntax.git", - "state" : { - "revision" : "1103c45ece4f7fe160b8f75b4ea1ee2e5fac1841", - "version" : "601.0.0" - } - }, - { - "identity" : "swiftlint", + "identity" : "swiftlintplugins", "kind" : "remoteSourceControl", - "location" : "https://github.com/realm/SwiftLint.git", + "location" : "https://github.com/SimplyDanny/SwiftLintPlugins.git", "state" : { - "revision" : "625792423014cc49b0a1e5a1a5c0d6b8b3de10f9", + "revision" : "8545ddf4de043e6f2051c5cf204f39ef778ebf6b", "version" : "0.59.1" } }, - { - "identity" : "swiftytexttable", - "kind" : "remoteSourceControl", - "location" : "https://github.com/scottrhoyt/SwiftyTextTable.git", - "state" : { - "revision" : "c6df6cf533d120716bff38f8ff9885e1ce2a4ac3", - "version" : "0.9.0" - } - }, - { - "identity" : "swxmlhash", - "kind" : "remoteSourceControl", - "location" : "https://github.com/drmohundro/SWXMLHash.git", - "state" : { - "revision" : "a853604c9e9a83ad9954c7e3d2a565273982471f", - "version" : "7.0.2" - } - }, { "identity" : "yams", "kind" : "remoteSourceControl", diff --git a/Package.swift b/Package.swift index e4d4785..ef237cb 100644 --- a/Package.swift +++ b/Package.swift @@ -27,11 +27,8 @@ let package = Package( url: "https://github.com/socketio/socket.io-client-swift.git", exact: "16.1.1"), .package( - url: "https://github.com/realm/SwiftLint.git", + url: "https://github.com/SimplyDanny/SwiftLintPlugins.git", exact: "0.59.1"), - .package( - url: "https://github.com/Quick/Nimble.git", - exact: "14.0.0"), ], targets: [ .target( @@ -44,7 +41,6 @@ let package = Package( name: "NodesSocketIOTests", dependencies: [ "NodesSocketIO", - "Nimble", ]), ] ) @@ -55,6 +51,7 @@ package.targets.forEach { target in .regular, .test, .executable, + .macro, ] guard types.contains(target.type) @@ -71,7 +68,7 @@ package.targets.forEach { target in if enableSwiftLintBuildToolPlugin { target.plugins = (target.plugins ?? []) + [ - .plugin(name: "SwiftLintBuildToolPlugin", package: "SwiftLint"), + .plugin(name: "SwiftLintBuildToolPlugin", package: "SwiftLintPlugins"), ] } } diff --git a/Tests/NodesSocketIOTests/NodesSocketIOTests.swift b/Tests/NodesSocketIOTests/NodesSocketIOTests.swift index 551381c..809c1e5 100644 --- a/Tests/NodesSocketIOTests/NodesSocketIOTests.swift +++ b/Tests/NodesSocketIOTests/NodesSocketIOTests.swift @@ -7,13 +7,16 @@ // See https://github.com/Tinder/Nodes-Tree-Visualizer/blob/main/LICENSE for license information. // -import Nimble import NodesSocketIO -import XCTest +import Testing -final class NodesSocketIOTests: XCTestCase { +struct NodesSocketIOTests { + private final class Mock: Sendable {} + + @Test func testDebugSocket() { - expect(DebugSocket()) != nil + let debugSocket: DebugSocket? = .init { _ in nil } + #expect(debugSocket != nil) } }