Tuesday, March 10, 2015

Why JavaDoc is matter in checkstyle code ?

As a mentor I do a lot of code reviews ...

My moto: Good code with good naming does not need any comment and JavaDoc

but ..... in Checkstyle we demand javadoc for all elements of class

Why we need that ?


1)
to validate method logic I need to know author intentions

2) catch problems in naming like
    /**
     * Method makes recurse DetailAST and save types that it returns. Its an
.........
     */
    private void findAllMethodReturnTypes(DetailAST processingSiblingAST) {

    /**
     * Method checks if inner private defined type (class, interface or enumeration)
     * is private and does not implement(extend)
     * something, if so it adds type's name to the set of private types.......
     */
    private void getPrivateType(DetailAST innerTypeDefAST) {


3)
It is better for reading of newly created code.

No comments:

Post a Comment