Turn // TODO: Comments Into Warnings and Errors in Xcode

Recently I was reintroduced by Krakendev.io to this little gem. Being able to turn your // TODO: style comments into warnings and errors. They also don’t effect the build’s result which is awesome. It keeps you focused on things that *need* to be done.

I edited the script a little to include older comment formats as well as a custom // WARNING: comment.

Here’s the gist:

https://gist.github.com/iJoeCollins/9323f40a82c8628e3ae5.js

All you have to do is paste this baby into a Run Script Phase in your targets Build Phases tab.

Here’s the post over at Krakendev.io: http://krakendev.io/blog/generating-warnings-in-xcode

Happy coding!


Follow me @iJoeCollins on twitter.