This is our exact use case as well. We've always had this in our build scripts:
if which swiftlint > /dev/null; then
if [ "${ENABLE_PREVIEWS}" = "YES" ]; then
exit 0;
else
swiftlint --fix; swiftlint;
fi
else
echo "warning: SwiftLint not installed, download from https://github.com/realm/SwiftLint"
fi
Topic:
Developer Tools & Services
SubTopic:
Xcode
Tags: