27.07.2013 18:06 Uhr, Quelle: The Unofficial Apple Weblog

DevJuice: Adding warnings for TODO and FIXME comments

A clever post from deallocatedobjects cropped up on IRC on Friday, and I thought I'd share its wisdom. The post discusses how you can add a custom build phase to automatically show TODO and FIXME comments as warnings in your Xcode 4 (and later) projects. It takes very little work. Select a target and choose Editor > Add Build Phase > Add Run Script Build Phase. Paste the following bash script in: KEYWORDS="TODO:|FIXME:|\?\?\?:|\!\!\!:" find "${SRCROOT}" \( -name "*.h" -or -name "*.m" \) -print0 | xargs -0 egrep --with-filename --line-number --only-matching "($KEYWORDS).*\$" | perl -

Weiterlesen bei The Unofficial Apple Weblog

Digg del.icio.us Facebook email MySpace Technorati Twitter

JustMac.info © Thomas Lohner - Impressum - Datenschutz