I am evaluating some students, and i am looking for an automated way to check for java conventions (camel casing) and documentation, is there any tool that does that? (preferably an online tool)
2 Answers
You can use Checkstyle. However, the standard checks (sun coding standards) are quite strict and you probably may want to remove some checks from the XML that is used for configuration, depending on your taste

- 3,837
- 2
- 24
- 33
While tools like Checkstyle can check adherence to style conventions, they should not be used to evaluate documentation. Yes, checkstyle can check that documentation is present, but not that this documentation is correct or in any way useful - and useless documentation is worse than none, since it at least doesn't clutter the source code. For instance, checkstyle would consider:
/**
* Gets the amount.
* @return the amount
*/
BigDecimal getAmount() {
return amount;
}
/**
* Sets the amount.
* @param amount the amount to set
*/
void setAmount(BigDecimal amount) {
this.amount = amount;
}
to be better (because comments exist and all parameters and return values are documented), than
/**
* @return the amount of this transaction (positive for deposits, negative for withdrawals)
*/
BigDecimal getAmount() {
return amount;
}
/**
* @see #getAmount()
*/
void setAmount(BigDecimal amount) {
this.amount = amount;
}
because the latter does not document the method parameter ...
In short, that documentation is adequate can not be verified by a machine, and easily obtainable metrics only show part of the picture - a largely irrelevant part in my opinion.

- 68,356
- 14
- 108
- 175