SwiftLint
SwiftLint copied to clipboard
How to enable SwiftLint for Xcode Cloud?
How I go about using SwiftLint with Xcode Cloud?
custom script?
We've just added a ci_post_clone.sh
that installs SwiftLint via HomeBrew: brew install swiftlint
And then you are good to go with your regular Build Phase script.
FWIW, for background there is a more detailed description of Xcode Cloud scripts here:
https://developer.apple.com/documentation/xcode/writing-custom-build-scripts
And here is someone's writeup of doing this for swiftlint
specifically ( (I forgot to chmod +x ci_post_clone.sh
on my first attempt 🤦 ):
https://www.oliverbinns.co.uk/2022/01/04/some-thoughts-on-xcode-cloud/
Anyone using the SPM plugin? How do you get that working with Xcode Cloud?
I'm just getting "SwiftLintPlugin" is disabled error
when one of the packages in the Xcode project is using SwiftLint as plugin.
Anyone using the SPM plugin? How do you get that working with Xcode Cloud? I'm just getting
"SwiftLintPlugin" is disabled error
when one of the packages in the Xcode project is using SwiftLint as plugin.
@pahnev I've not used Xcode Cloud yet, but could this be related to the Plugin not being trusted in that environment?
xcodebuild
offers a -skipPackagePluginValidation
flag to bypass this trust check. In Swift Package Manager this can be done by the --resolver-fingerprint-checking
flag.
You can also set defaults write com.apple.dt.Xcode IDESkipPackagePluginFingerprintValidatation -bool YES
in your post clone script as described here https://forums.swift.org/t/telling-xcode-14-beta-4-to-trust-build-tool-plugins-programatically/59305/7