Checkstyle Errors Explained

You can consult the checkstyle documentation for a complete explanation of all checks.

Most checkstyle messages are self-explanatory: warning: Method length is 67 lines (max allowed is 50). Line is longer than 89 characters. One character variable name not allowed: c 'if' construct must use '{}'s. ',' is not followed by whitespace. '{' should be on a new line.

Here are explanations for a few of the more obscure messages. Name 'FEET_PER_MILE' must match pattern '^k[A-Z][a-zA-Z0-9]*$'

        The old C-style constants in all caps is not used in our coding standard.  Consult the coding standard definition for Constants to see the correct way to name constant identifiers.  For fun, see this humorous explanation. '5000' is a magic number.

Use a named constant, not a numeric literal.  And don't name the constant static int fivethousand = 5000;  Tell us what five thousand means, e.g.,  static int kMaxBoards = 5000; Must have at least one statement.

    Don't use empty braces. Logic structure must be preceded by a comment.

The coding standard says "Every control structure block (loop, decision, case, sequence block) has a descriptive comment on the preceeding line." Missing a Javadoc comment. Expected @param tag for 'table'. Expected @param tag for 'value'. Expected an @return tag.

Provide complete Javadoc comments on all public methods. 'table' hides a field.

You have a local variable with the same name as an instance variable (field).   Change the name of the local variable. warning: Cyclomatic Complexity is 16 (max allowed is 10).

You logic is too complex, that is, too many nested decisions or loops.  Here is the complete explanation.  You should simplify your logic or decompose a large method into smaller ones. Class Fan-Out Complexity is 30 (max allowed is 20).

The number of other classes a given class relies on.  The instructor may allow exceptions to this rule in special circumstances (must be negotiated in advance).