-
Notifications
You must be signed in to change notification settings - Fork 514
AuthMe Coding Styleguide
ljacqu edited this page Nov 23, 2015
·
3 revisions
- Use indentation of four spaces
- Always wrap structures like
if
,while
with braces (neverif (isTrue) doThis();
) - Fields should not be public – use getters and setters where appropriate
- Max line width: 120 characters
As usual in Java:
- Class names should be uppercase and in CamelCase
- Names of methods, fields and variables in lowercase and camelCase
Use the imperative mood for verbs: "Get the player's name". JavaDoc should briefly explain what the method does and provide additional information to the developer.
Put an empty line between the description and the first @param
, and between the last @param
and @return
.
Example:
/**
* Add a permission node required to execute this command.
*
* @param permissionNode The permission node to add.
*
* @return True on success, false on failure.
*/
public boolean addPermissionNode(String permissionNode)