-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SwiftLint plugin for SPM doesn't seem to be discoverable #4542
Comments
Hello, you can target 0.50.0-rc4 using revision :
However it seems this version don't implement yet CommandBuild to use SwiftLint using command line :
For example, SwiftGen has implemented this command :
SwiftGen CommandPlugin here : https://github.com/SwiftGen/SwiftGenPlugin/blob/stable/Plugins/SwiftGen-Generate/Plugin.swift |
Oh, so, currently it's only an Xcode plugin? |
I think yes, CommandPlugin protocol must be implemented to run SwiftLint in command line (useful for CI) |
I believe this is the same issue as #4558? Closing as a duplicate, but please let me know if I'm missing something. |
There's overlap in the issue with regard to versioning. However, independent of versioning (when I checkout |
@technocidal since you added the plugins in #4176, perhaps you're more familiar with what's happening here? And in general, if you wanted to help with plugin-related inbound issues, I'd really appreciate it. |
I agree with @RemiRodriguesLM. This is due to the missing support to run SwiftLint as a Command Plug-in. Implementing that shouldn't be too hard. I'll try to take a look tomorrow and update this thread with some findings. |
After a week of some personal stuff I had some time to look into this. You can find my current progress here. I’ll use many of the improvements that were made to the original Build Tool Plugin implementation like the automatic configuration file discovery etc. Command Tool Plugins give users the option to provide additional arguments so we’re not that dependent on automatic behavior, but it’s nice to have more sensible defaults. They also come with their own challenges that I’m currently trying to understand/need feedback.
This is all the stuff that I found until now. I’ll continue working on this throughout the week as I’ve some long-distance train journeys. |
I've not made any significant progress on this as I was looking into the other more pressing issues with plugins. I don't see an easy way out here and I'm starting to agree with @jpsim that it might be easier to condense our findings into some more documentation and remove the official first-party plugin. It seems like the implementation on Xcode/Swift Package side is not really ready for primetime yet. |
New Issue Checklist
Describe the bug
SwiftLint's plugin is not discoverable by SPM through
swift package plugin --list
. When running the aforementioned command, the swiftlint plugin is not listed.I added
.package(url: "https://github.com/realm/SwiftLint.git", branch: "main")
to my SPM dependencies, because0.50.0-rc.4
gives another error:Environment
xcodebuild -version
)?The text was updated successfully, but these errors were encountered: