Related: How to use ant to check for tags (TODO: etc) in java source
当我运行它时,如何让 ant 列出在构建输出中的代码中找到的 TODO:
标记。如果找到它们,我希望构建失败是可选的(即:设置)。
我试过了 Checkstyle正如相关帖子中所建议的,但它不显示 TODO:
的文本。
即:
[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:'.
最佳答案
我不确定这是否提供了在找到待办事项时使构建失败的能力,但它可能很有用 http://code.google.com/p/ant-todo/
关于java - 如何列出 TODO : in Ant build output,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2745262/