-
Notifications
You must be signed in to change notification settings - Fork 0
Sharing iP code quality feedback [for @yeo-yiheng] #2
Description
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 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/task/TaskList.java lines 91-91:
boolean emptyDescription = false;Suggestion: Follow the given naming convention for boolean variables/methods
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: 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)
possible problems in commit 221a847:
Improved the code quality as per the styling convention
- Not in imperative mood (?)
possible problems in commit 3734967:
Add assertions into program to ensure the state of program is correct during runtime
- Longer than 72 characters
possible problems in commit bcfb0d1:
Add central commands class that oversees all commands, add GUI for improved UX and add javadocs for existing implementation
- Longer than 72 characters
Suggestion: Follow the given conventions for Git commit messages
ℹ️ The bot account @cs2103-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.