Skip to content

Instantly share code, notes, and snippets.

@satishbabariya
Created March 12, 2018 06:42
Show Gist options
  • Save satishbabariya/e9c92bdbb34713d9a29c777e070e7c3e to your computer and use it in GitHub Desktop.
Save satishbabariya/e9c92bdbb34713d9a29c777e070e7c3e to your computer and use it in GitHub Desktop.
Highlight Warnings TODO:|FIXME:|WARNING:
TAGS="TODO:|FIXME:|WARNING:"
ERRORTAG="ERROR:"
find "$PROJECT_DIR/$PROJECT_NAME" \( -name "*.h" -or -name "*.m" -or -name "*.swift" \) -print0 | xargs -0 egrep --with-filename --line-number --only-matching "($TAGS).*\$|($ERRORTAG).*\$" | perl -p -e "s/($TAGS)/ warning: \$1/"| perl -p -e "s/($ERRORTAG)/ error: \$1/"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment