Skip to content

Instantly share code, notes, and snippets.

@rijieli
Created May 1, 2022 08:11
Show Gist options
  • Save rijieli/10e9099526ac044fc783c0448d517242 to your computer and use it in GitHub Desktop.
Save rijieli/10e9099526ac044fc783c0448d517242 to your computer and use it in GitHub Desktop.
# TAGS speparated by vertical line |
OPTIMIZE_TAGS="OPTIMIZE:|TEST:"
find "${SRCROOT}/" \( -name "*.h" -or -name "*.m" -or -name "*.swift" \) -print0 | xargs -0 egrep --with-filename --line-number --only-matching "($OPTIMIZE_TAGS).*\$" | wc -l | xargs -I{} echo "warning: 🔆 {} Optimize | Test Items"
NEXTUP_TAGS="NEXTUP:"
find "${SRCROOT}/" \( -name "*.h" -or -name "*.m" -or -name "*.swift" \) -print0 | xargs -0 egrep --with-filename --line-number --only-matching "($NEXTUP_TAGS).*\$" | wc -l | xargs -I{} echo "warning: 🗃️ {} NextUp Tasks"
FIXME_TAGS="FIXME:"
find "${SRCROOT}/" \( -name "*.h" -or -name "*.m" -or -name "*.swift" \) -print0 | xargs -0 egrep --with-filename --line-number --only-matching "($FIXME_TAGS).*\$" | perl -p -e "s/($FIXME_TAGS)/ warning: 🔥/"
TAGS="TODO:"
find "${SRCROOT}/" \( -name "*.h" -or -name "*.m" -or -name "*.swift" \) -print0 | xargs -0 egrep --with-filename --line-number --only-matching "($TAGS).*\$" | perl -p -e "s/($TAGS)/ warning: ✅/"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment