为了通过检查样式的发现,一些开发人员简单地在他们的代码上运行JAutodoc,这会产生如下所示的无意义的注释。IMHO,任何自动化文档都是不好的,因为它不会给我从名字中获得的信息增加任何东西。
有没有什么工具可以测量或检查更高质量的javadoc-comments?我想我不能期望自然语言处理,但也许还有其他想法/工具...
/** The message identification. */
private String messageIdentification;
/**
* Returns the messageIdentification.
*
* @return the messageIdentification.
*/
public String getMessageIdentification() {
return messageIdentification;
}
/**
* Sets the messageIdentification.
*
* @param messageIdentification the messageIdentification.
*/
public void setMessageIdentification(String messageIdentification) {
this.messageIdentification = messageIdentification;
}发布于 2012-01-12 20:31:11
您是否考虑过与开发人员交谈并询问他们为什么要这样做?
另一方面,这个getter真的需要javadoc吗?消息标识到底是什么?它的名字还能更好吗?
/**
* Returns the messageIdentification.
*
* @return the messageIdentification.
*/
public String getMessageIdentification() {
return messageIdentification;
}https://stackoverflow.com/questions/8834991
复制相似问题