diff --git a/docs/style-guide.md b/docs/style-guide.md index 14afe6f..77457a0 100644 --- a/docs/style-guide.md +++ b/docs/style-guide.md @@ -139,33 +139,36 @@ Methods within a class SHOULD be in the following order. # Javadoc * Java classes, methods, and constants MUST have a valid and complete Javadoc entry accompanying them -* MUST describe the full function of the object they are documenting -* MUST accurately describe the function of any parameters -* MUST describe the return type and returned object if applicable -* SHOULD include any implementation specifics that might be useful to whoever is using the object +* Javadoc entries MUST describe the full function of the object they are documenting, even if the description is redundant with the name of the object +* Javadoc entries MUST accurately describe the function of any parameters +* Javadoc entries MUST describe the return type and returned object if applicable +* Javadoc entries SHOULD include any implementation specifics that might be useful to whoever is using the object +* Javadoc entries SHOULD be written in sentence case with appropriate punctuation +* Descriptions of Javadoc annotations like `@param` and `@return` MUST be on the next line * References to classes MUST be linked to the classes they are referencing to make browsing the hosted Javadoc easier Examples: ```java /** - * safely set the target angle for the arm - * - * @param targetDegrees - * the target angle for the arm in degrees - */ - public void setArmTarget(double targetDegrees) { - ... - } + * Safely sets the target angle for the arm. + * + * @param targetDegrees + * the target angle for the arm in degrees + */ +public void setArmTarget(double targetDegrees) { + ... +} ``` ```java /** - * get the velocity of the arm - * - * @return the velocity of the arm in m/s - */ - public double getArmVelocity(){ - ... - } + * Gets the velocity of the arm. + * + * @return + * the velocity of the arm in m/s + */ +public double getArmVelocity(){ + ... +} ``` When you hover over a function with Javadoc anywhere in the project it will apear. ![Javadoc in VSCode](/code-standards/assets/images/javadoc-vscode.png)