#!/bin/sh

SRCROOT="$(git rev-parse --show-toplevel)/CutBox/CutBox/Source"

TAGS="TODO|FIXME"
echo "Searching ${SRCROOT} for ${TAGS}"
find "${SRCROOT}" \( -name "*.swift" \) -print0 \
| xargs -0 grep -E --with-filename --line-number --only-matching "($TAGS).*\$" \
| perl -p -e "s/($TAGS)/ warning: \$1/"
