如何使用ant来检查标签:Java源(TODO等) [英] How to use ant to check for tags (TODO: etc) in java source

查看:194
本文介绍了如何使用ant来检查标签:Java源(TODO等)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是经常可以看到在code这样的事情,希望只在开发过程

it's common to see something like this in code, hopefully only during development:

//XXX: not in production!
String password = "hello"; // getActualPassword(...);
...
catch(Exception e) { /* TODO: Auto-generated catch block*/ }

我想蚂蚁能够一)警告(关于TODO:/ FIXME:标签)或失败(在XXX:或simmilar)

构建服务器是Linux,土生土长的和基于蚂蚁。需要,如果不能在Linux至少工作在Windows上。

I would like ant to be able to a) warn (on TODO: / FIXME: tags) or fail (on XXX: or simmilar)
The build server is linux, home grown and based on ant. Would need to work at least on linux if not on windows.

我们也使用Perforce公司,如果还有一个办法是阻止文件提交。

我们还使用Eclipse,但我不认为你可以使它成为一个致命的错误。 (是的,有任务的看法,但是我希望能够提升某些代码建立断路器)

We also use perforce if an alternative is to block file commits.
We also use eclipse, however I don't think you can make it a fatal error. (yes, there's the tasks view, however I would like to be able to elevate certain tags to build-breakers)

推荐答案

也许你可以使用 Checkstyle的
我认为这是对TODO意见和Checkstyle的检查可以运行作为一个Ant任务,所以你可能会达到你想要的东西。

Maybe you can use Checkstyle. I think there is a check for TODO comments and checkstyle can be run as an Ant task so you might achieve what you want.

这篇关于如何使用ant来检查标签:Java源(TODO等)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆