Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sharing iP code quality feedback [for @RiyaMehta2211] #3

Open
soc-se-bot opened this issue Sep 16, 2023 · 0 comments
Open

Sharing iP code quality feedback [for @RiyaMehta2211] #3

soc-se-bot opened this issue Sep 16, 2023 · 0 comments

Comments

@soc-se-bot
Copy link

@RiyaMehta2211 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

No easy-to-detect issues 👍

Aspect: Brace Style

Example from src/main/java/duke/Parser.java lines 46-47:

            }
            else {

Example from src/main/java/duke/Parser.java lines 81-82:

            }
            else {

Suggestion: As specified by the coding standard, use egyptian style braces.

Aspect: Package Name Style

No easy-to-detect issues 👍

Aspect: Class Name Style

No easy-to-detect issues 👍

Aspect: Dead Code

Example from src/test/java/duke/StorageTest.java lines 25-25:

            //assert storage.loadTasks("src/data/newFile.txt").equals(tasks);

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

No easy-to-detect issues 👍

Aspect: Recent Git Commit Message

possible problems in commit f7db2bc:


Making minor modification to Event class taskstring


  • Not in imperative mood (?)

possible problems in commit ef1dbfe:


Improve code quality by creating methods in Parser

The chat() method is in charge of parsing the different user inputs. The subsequent actions based on the respective inputs are split into different methods. The actions have been categorised under updating lists, adding tasks and returning lists. 3 methods to represent these categories.

Let's improve code quality by making more methods which are shorter and avoid deep nesting. It is also good to keep methods simple and easy to understand.


  • body not wrapped at 72 characters: e.g., The chat() method is in charge of parsing the different user inputs. The subsequent actions based on the respective inputs are split into different methods. The actions have been categorised under updating lists, adding tasks and returning lists. 3 methods to represent these categories.

possible problems in commit 7054660:


Merge pull request #1 from RiyaMehta2211/branch-A-Assertions

Add assertions for error handling and important assumptions for valid inputs

  • body not wrapped at 72 characters: e.g., Add assertions for error handling and important assumptions for valid inputs

Suggestion: Follow the given conventions for Git commit messages for future commits (no need to modify past commit messages).

Aspect: Binary files in repo

No easy-to-detect 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 cs2103@comp.nus.edu.sg if you want to follow up on this post.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant