@StanleyLG We did an automated analysis of your code to detect potential areas to improve the code quality. We are sharing the results below, to help you improve the iP code further.
IMPORTANT: Note that the script looked for just a few easy-to-detect problems only, and at-most three example are given i.e., there can be other areas/places to improve.
Aspect: Tab Usage
No easy-to-detect issues 👍
Aspect: Naming boolean variables/methods
Example from src/main/java/Duke/parser/CMD_Deadline.java lines 37-37:
Example from src/main/java/Duke/parser/CMD_Event.java lines 36-36:
Example from src/main/java/Duke/parser/CMD_TODO.java lines 29-29:
Suggestion: Follow the given naming convention for boolean variables/methods (e.g., use a boolean-sounding prefix).You may ignore the above if you think the name already follows the convention (the script can report false positives in some cases)
Aspect: Brace Style
Example from src/main/java/Duke/parser/CMD.java lines 47-48:
}
catch(ArrayIndexOutOfBoundsException aio) {
Example from src/main/java/Duke/parser/CMD.java lines 51-52:
Example from src/main/java/Duke/parser/CMD.java lines 92-93:
}
catch(NumberFormatException nf){
Suggestion: As specified by the coding standard, use egyptian style braces.
Aspect: Package Name Style
Example from src/main/java/Duke/Duke.java lines 1-1:
Example from src/main/java/Duke/DukeTest.java lines 1-1:
Example from src/main/java/Duke/exception/DukeException.java lines 1-1:
Suggestion: Follow the package naming convention specified by the coding standard.
Aspect: Class Name Style
Example from src/main/java/Duke/parser/CMD_Add.java lines 3-3:
public class CMD_Add extends CMD {
Example from src/main/java/Duke/parser/CMD_Bye.java lines 7-7:
public class CMD_Bye extends CMD {
Example from src/main/java/Duke/parser/CMD_Delete.java lines 7-7:
public class CMD_Delete extends CMD{
Suggestion: Follow the class naming convention specified by the coding standard.
Aspect: Dead Code
Example from src/main/java/Duke/parser/CMD.java lines 87-87:
//taskList[Integer.parseInt(doneCmd[1]) - 1].setDone();
Example from src/main/java/Duke/parser/CMD_Deadline.java lines 83-83:
Suggestion: Remove dead code from the codebase.
Aspect: Method Length
No easy-to-detect issues 👍
Aspect: Class size
No easy-to-detect issues 👍
Aspect: Header Comments
Example from src/main/java/Duke/Duke.java lines 16-20:
/**
* Beginning function taking in filepath
*
* @param filePath - filepath to storage
*/
Example from src/main/java/Duke/exception/DukeException.java lines 4-9:
/**
* A base class for self-defined exceptions
*
* @param message the pre-defined message
*
*/
Example from src/main/java/Duke/exception/EmptyDescriptionException.java lines 5-15:
/**
* Thrown when user did not give a description for the task
*
* Prints the following
* printer.separator();
* System.out.printf(" OOPS!!! The description of a %s cannot be empty.\n", taskType);
* printer.separator();
*
* @param message the pre-defined message
*
*/
Suggestion: Ensure method/class header comments follow the format specified in the coding standard, in particular, the phrasing of the overview statement
ℹ️ The bot account @nus-se-bot used to post this issue is un-manned. Do not reply to this post (as those replies will not be read). Instead, contact tic2002@comp.nus.edu.sg if you want to follow up on this post.
@StanleyLG We did an automated analysis of your code to detect potential areas to improve the code quality. We are sharing the results below, to help you improve the iP code further.
IMPORTANT: Note that the script looked for just a few easy-to-detect problems only, and at-most three example are given i.e., there can be other areas/places to improve.
Aspect: Tab Usage
No easy-to-detect issues 👍
Aspect: Naming boolean variables/methods
Example from
src/main/java/Duke/parser/CMD_Deadline.javalines37-37:Example from
src/main/java/Duke/parser/CMD_Event.javalines36-36:Example from
src/main/java/Duke/parser/CMD_TODO.javalines29-29:Suggestion: Follow the given naming convention for boolean variables/methods (e.g., use a boolean-sounding prefix).You may ignore the above if you think the name already follows the convention (the script can report false positives in some cases)
Aspect: Brace Style
Example from
src/main/java/Duke/parser/CMD.javalines47-48:} catch(ArrayIndexOutOfBoundsException aio) {Example from
src/main/java/Duke/parser/CMD.javalines51-52:} else {Example from
src/main/java/Duke/parser/CMD.javalines92-93:} catch(NumberFormatException nf){Suggestion: As specified by the coding standard, use egyptian style braces.
Aspect: Package Name Style
Example from
src/main/java/Duke/Duke.javalines1-1:Example from
src/main/java/Duke/DukeTest.javalines1-1:Example from
src/main/java/Duke/exception/DukeException.javalines1-1:Suggestion: Follow the package naming convention specified by the coding standard.
Aspect: Class Name Style
Example from
src/main/java/Duke/parser/CMD_Add.javalines3-3:Example from
src/main/java/Duke/parser/CMD_Bye.javalines7-7:Example from
src/main/java/Duke/parser/CMD_Delete.javalines7-7:Suggestion: Follow the class naming convention specified by the coding standard.
Aspect: Dead Code
Example from
src/main/java/Duke/parser/CMD.javalines87-87://taskList[Integer.parseInt(doneCmd[1]) - 1].setDone();Example from
src/main/java/Duke/parser/CMD_Deadline.javalines83-83://LocalDateTime.of(,,);Suggestion: Remove dead code from the codebase.
Aspect: Method Length
No easy-to-detect issues 👍
Aspect: Class size
No easy-to-detect issues 👍
Aspect: Header Comments
Example from
src/main/java/Duke/Duke.javalines16-20:Example from
src/main/java/Duke/exception/DukeException.javalines4-9:Example from
src/main/java/Duke/exception/EmptyDescriptionException.javalines5-15:Suggestion: Ensure method/class header comments follow the format specified in the coding standard, in particular, the phrasing of the overview statement
ℹ️ The bot account @nus-se-bot used to post this issue is un-manned. Do not reply to this post (as those replies will not be read). Instead, contact
tic2002@comp.nus.edu.sgif you want to follow up on this post.