13 lines
616 B
Bash
Executable File
13 lines
616 B
Bash
Executable File
#!/bin/sh
|
|
|
|
if [[ "$BUILD_DIR" == *"IBDesignables"* ]] || [[ "$BUILD_DIR" == *"Previews"* ]] ; then
|
|
echo "do nothing when building for IBDesignables/SwiftUI Previews builds";
|
|
exit 0
|
|
fi
|
|
|
|
if [ "${CONFIGURATION}" = "Debug" ]; then
|
|
TAGS="TODO:|FIXME:|WARNING:"
|
|
echo "searching ${SRCROOT} for ${TAGS}"
|
|
find "${SRCROOT}" -type f -name "*.swift" ! -path "${SRCROOT}/vendor/*" ! -path "${SRCROOT}/build/*" ! -path "${SRCROOT}/DerivedData/*" ! -path "${SRCROOT}/Carthage/*" -print0 | xargs -0 egrep --with-filename --line-number --only-matching "($TAGS).*\$" | perl -p -e "s/($TAGS)/ warning: \$1/"
|
|
fi
|