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 @meowwtama] #1

Open
nus-se-bot opened this issue Feb 17, 2024 · 0 comments
Open

Sharing iP code quality feedback [for @meowwtama] #1

nus-se-bot opened this issue Feb 17, 2024 · 0 comments

Comments

@nus-se-bot
Copy link

@meowwtama 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/anita/Duke.java lines 7-7:

    protected static boolean initialize = true;

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

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/anita/Database.java lines 92-96:

    /**
     * Used to delete the corresponding data line in the file after deleting a task.
     *
     * @param index The index of the deleted task.
     */

Example from src/main/java/anita/Duke.java lines 25-30:

    /**
     * Main driver code for executing commands.
     * If user command is not valid, throws the respective exception.
     *
     * @return String command.
     */

Example from src/main/java/anita/Parser.java lines 20-26:

    /**
     * Used for specific commands where an index is expected.
     * Parses the String input into an int and returns it.
     *
     * @param description The raw user input.
     * @return Index specified by the user.
     */

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

possible problems in commit 23e1183:


Complete Level 9 find

Add case for "find" in Duke class.

Add findTask method in TaskList class.

Users can now make use of the find command to find tasks containing a certain keyword.


  • body not wrapped at 72 characters: e.g., Users can now make use of the find command to find tasks containing a certain keyword.

possible problems in commit 37b116f:


Merge branch 'tmp'
commit is needed to fix detached head branch.


  • No blank line between subject and body

possible problems in commit 04048f6:


A-CodingStandard update

Changed intellij settings to suit coding standards. Applied the changes to code. (eg. switch statements)


  • body not wrapped at 72 characters: e.g., Changed intellij settings to suit coding standards. Applied the changes to code. (eg. switch statements)

Suggestion: Follow the given conventions for Git commit messages for future commits (do not modify past commit messages as doing so will change the commit timestamp that we used to detect your commit timings).

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 [email protected] 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