Skip to content

Instantly share code, notes, and snippets.

@T1T4N
Created March 26, 2020 21:16
Show Gist options
  • Save T1T4N/0c8232ed01393d72b3fc7a2facd4b2c5 to your computer and use it in GitHub Desktop.
Save T1T4N/0c8232ed01393d72b3fc7a2facd4b2c5 to your computer and use it in GitHub Desktop.
SwiftLint Build Phase
# Archiving (incorrectly) fails when issues are detected
# even though the swiftlint exit code is 0
[ "$CONFIGURATION" != "Release" ] || exit 0
: $((count=0))
while [ $count -lt ${SCRIPT_INPUT_FILE_COUNT} ]; do
input_var="SCRIPT_INPUT_FILE_$count"
input_path="${!input_var}"
swiftlint lint --config "${SRCROOT}/.swiftlint.yml" --path "${input_path}" || true
count=$((count + 1))
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment