-
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
SwiftLintPlugin execution from Script Build Phase #5677
Conversation
When using the plugin, it's possible to run the command directly in the Script Build Phase, just like any other command
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
An interesting and nifty way to get to a versioned binary. 👍
However, it's probably not sure if this will work with future Xcode versions. Perhaps, we should also add a warning that this approach might fail with changes in Xcode.
Co-authored-by: Danny Mösch <[email protected]>
Yes, I know, it's possible, if Xcode change again the project package path, but for now, it's working on the version 15 and 16. We can replace this static path by a command to automatically find the binary, but i'm not a fan to execute it every time... |
Well, then we should mention exactly that: works in Xcode 15 and 16, but no guarantee for other versions or an alternative path. |
Co-authored-by: Danny Mösch <[email protected]>
Co-authored-by: Danny Mösch <[email protected]>
add warnings about the values of package path
update warn about default package path
Ok, I added this message.
Understand, I'm using the default Xcode values. The user must adapt his configuration. |
Co-authored-by: Danny Mösch <[email protected]>
When using the plugin from SPM, it's possible to run the switlint binary directly in the Script Build Phase, just like any other command.
The script locates the binary path and executes the command.
Sound like the CocoaPods integration.
I just added the script in the README and using the default value (xcode 15/16), these values can be wrong in previous xcode version or with custom package path.