tags:

views:

39

answers:

1

Related: How to use ant to check for tags (TODO: etc) in java source


How can I get ant to list TODO: tags found in my code in the build output when I run it. I would like build failure to be optional (ie: a setting) if they are found.


I've tried Checkstyle as suggested in the related post, but it doesn't display the text of the TODO:.

IE:

[checkstyle] .../src/Game.java:36: warning: Comment matches to-do format 'TODO:'.
[checkstyle] .../src/Game.java:41: warning: Comment matches to-do format 'TODO:'.
[checkstyle] .../src/GameThread.java:25: warning: Comment matches to-do format 'TODO:'.
[checkstyle] .../src/GameThread.java:30: warning: Comment matches to-do format 'TODO:'.
[checkstyle] .../src/GameThread.java:44: warning: Comment matches to-do format 'TODO:'.
+1  A: 

I am not sure if this provides the ability to fail a build if a todo is found but it may be usefull http://code.google.com/p/ant-todo/

Mex
This may work, especially in conjunction in with checkstyle.
C. Ross
Does this task have its equally evil twin `<fixme>`? :)
Alexander Pogrebnyak