-
Notifications
You must be signed in to change notification settings - Fork 0
Sharing iP code quality feedback [for @yeo-yiheng] - Round 2 #3
Description
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
Example from src/main/java/duke/task/TaskList.java lines 91-91:
boolean emptyDescription = false;Suggestion: Follow the given naming convention for boolean variables/methods (e.g., use a boolean-soundingprefix).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
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
Example from src/main/java/duke/parser/Parser.java lines 153-153:
// assert ld != null : "Date cannot be null";Example from src/main/java/duke/parser/Parser.java lines 154-154:
// assert deadlineTiming != null : "Deadline timing cannot be null";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 47-49:
/**
* A function that does nothing at all.
*/Example from src/main/java/duke/DukeLauncher.java lines 10-14:
/**
* The main function to be called that runs the entire program.
*
* @param args args provided during execution
*/Example from src/main/java/duke/task/TaskList.java lines 174-184:
/**
* Responsible for creating the task based on the file storage contents. This
* method differs from the original add method as it does not go through any checks and parsing
* is already done.
*
* @param taskChar the identifier for the type of task class to be created
* @param taskStatus the identifier for the status of task class to be created
* @param description the description of the task
* @param timeline the timeline of the task
* @return the new task created based on the given parameters
*/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 👍
❗ 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 @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 cs2103@comp.nus.edu.sg if you want to follow up on this post.