@johnbenedictyan We did an automated analysis of your code to detect potential areas to improve the code quality. We are sharing the results below, so that you can avoid similar problems in your tP code (which will be graded more strictly for code quality).
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
No easy-to-detect issues ๐
Aspect: Brace Style
No easy-to-detect issues ๐
Aspect: Package Name Style
No easy-to-detect issues ๐
Aspect: Class Name Style
No easy-to-detect issues ๐
Aspect: Dead Code
No easy-to-detect issues ๐
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 36-45
:
/**
* The runCommandLoopUntilExitCommand function runs a loop that will continue to
* run until the user enters an exit command.
* It first asks for a command from the user, and then tries to parse it using
* the Parser class. If there is an error in parsing,
* it will display that error message and ask for another command. Otherwise, if
* there are no errors in parsing, it runs runCommand on
* the parsed Command object (which returns a CommandResult). The function then
* displays this result on screen using Ui's showResult method.
*/
Example from src/main/java/duke/Duke.java
lines 60-70
:
/**
* The runCommand function takes a BaseCommand object as an argument and
* executes it.
* If the command is a BaseTaskCommand, then the task list is set to this
* TaskList object.
* The function returns the result of executing that command.
*
* @param command
* Pass the command object to the run command method
* @return A command result object
*/
Example from src/main/java/duke/Duke.java
lines 83-91
:
/**
* The run function is the main function of the program. It starts by showing
* a greeting message to the user, then enters a loop that runs until an exit
* command is entered. Inside this loop, it parses and executes commands from
* standard input (the keyboard). The run function also handles exceptions and
* prints error messages to standard output (the screen). When an exception is
* thrown during execution of a command, it will be caught here so that we can
* print out an appropriate error message before continuing with our program.
*/
Suggestion: Ensure method/class header comments follow the format specified in the coding standard, in particular, the phrasing of the overview statement.
Aspect: Recent Git Commit Message (Subject Only)
No easy-to-detect issues ๐
Aspect: Binary files in repo
No easy-to-detect issues ๐
โ You are not required to (but you are welcome to) fix the above problems in your iP, unless you have been separately asked to resubmit the iP due to code quality issues.
โน๏ธ The bot account used to post this issue is un-manned. Do not reply to this post (as those replies will not be read). Instead, contact [email protected]
if you want to follow up on this post.