Skip to content

Instantly share code, notes, and snippets.

View crespoxiao's full-sized avatar

Chengfei Xiao crespoxiao

View GitHub Profile
@crespoxiao
crespoxiao / gist:e5ec18352d6f59dadf482620dbc53894
Created January 31, 2018 08:38
Showing TODO as warning in Xcode project
1. solution 1 --- add run script
TAGS="TODO:|FIXME:|XXX:"
echo "searching patch is ${SRCROOT}"
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: \$1/"
2. solution 2 --- by code
#define STRINGIFY(S) #S