realm / SwiftLint

A tool to enforce Swift style and conventions.
https://realm.github.io/SwiftLint
MIT License
18.45k stars 2.2k forks source link

Swiftlint plugin in my own SPM #5636

Closed DavidGollum closed 1 week ago

DavidGollum commented 1 week ago

New Issue Checklist

Describe the bug

Since the version 0.55.0 I can use the SwiftLintPlugin in my SPM i got the error, I have to use the 0.54.0 version

product 'SwiftLintPlugin' required by package '[MY SPM]' target '[MY TARGET]' not found in package 'SwiftLint'.

My package Configuration
let package = Package(
    name: "PACKAGE NAME",
    platforms: [.iOS("13.0")],
    products: [...],
    dependencies: [
        // Dependencies declare other packages that this package depends on.
        **.package(url: "https://github.com/realm/SwiftLint.git", exact: "0.55.1")**
    ],
    targets: [
        // Targets are the basic building blocks of a package, defining a module or a test suite.
        // Targets can depend on other targets in this package and products from dependencies.
        .target(
            name: "TARGETNAME",
            dependencies: [...],
            resources: [
                .process("Resources")
            ],
            **plugins: [
                .plugin(name: "SwiftLintPlugin", package: "SwiftLint")
            ]**
        ),
)
SimplyDanny commented 1 week ago

The plugin has been renamed to SwiftLintBuildToolPlugin in order to differentiate it from the new SwiftLintCommandPlugin. See CHANGELOG.md.

That said, I recommend to consume the plugin from SimplyDanny/SwiftLintPlugins instead for the reasons mentioned in its README.