-
Notifications
You must be signed in to change notification settings - Fork 247
FormatPlugin
and LintPlugin
are not BuildToolPlugin
.
#511
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
Comments
There is some previous discussion of this in this pull request. |
@allevato is there interest in this? I'd be happy to pick up adding build plugins, but it would probably necessitate hosting pre-built binaries and including them via |
@tonyarnold I think it would be a very nice addition to be able to either lint or format the code during the build phase. |
I'm happy to help out with this. I had closed #489 as it felt as if we needed the larger solution of making things into build plugins. |
Any updates on this? It will really handy to have the lint warnings while building. |
Any updates here? SwiftLint has become very bloated. It would be nice to finally be able to use the official linter/formatter |
I attempted this here #690 but without a hosted binary, the build plugins cannot be run. |
Tracked in Apple’s issue tracker as rdar://126948335 |
is there any movement on this? |
Just my yearly checkup on this issue. Is there any chance of this ever coming? Is there a reason there is so little movement here? Is it a limitation of SPM? Im just curious. Because SwiftLint has had this available for quite some time. EDIT: I noticed that this tool is now included with the swift toolchain. That's huge. Does anyone know if there is a way to get this running when working on swift packages? As far as I am aware, you can only run pre-build scripts for Xcode app projects. |
It works fine with Swift Packages - there's no such limitation around pre-build commands. Here, use this as your plugin, and it should work just fine: https://gist.github.com/tonyarnold/9ce276cb6cd3c0e4933c070e1ab5ecac I found Xcode would not show the warnings in the navigator for Xcode targets, but they show up in the build logs, and within the sources you're working with. Swift Packages worked great - everything showed up where it should, including in the navigator. |
Most formatting and linting tasks happen at build time and Xcode has support for build time plugins if they conform to
BuildToolPlugin
. Therefore, maybe we should consider makingFormatPlugin
andLintPlugin
BuildToolPlugin
? This will make it easier to integrate swift-format for people who use Xcode.The text was updated successfully, but these errors were encountered: