Skip to content

Sharing iP code quality feedback [for @starbucksventi] #4

@nus-se-script

Description

@nus-se-script

@starbucksventi 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/duke/Ui.java lines 21-21:

    private boolean flag = false;

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

Example from src/main/java/duke/Duke.java lines 19-19:

    //private static void addItem(String inp) {

Example from src/main/java/duke/Duke.java lines 20-20:

    //    userInputs.add(new duke.Task(inp));

Example from src/main/java/duke/Duke.java lines 21-21:

    //}

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/Deadline.java lines 25-31:

    /**
     * Set the deadline of the Deadline object to a new value, by inputting the new deadline using the
     * {@link LocalDate} format.
     *
     * @param deadline The date the task should be completed by, using the {@link LocalDate} format.
     *
     */

Example from src/main/java/duke/Storage.java lines 22-26:

    /**
     * The method that loads task information from the user to the program upon running the program.
     * @return an ArrayList holding in order, all the user's tasks.
     * @throws FileNotFoundException If the file storing the tasks of the user cannot be found, this error is thrown.
     */

Example from src/main/java/duke/Ui.java lines 92-96:

    /**
     * The method that displays the customised header when the user enters the appropriate command before it lists
     * the tasks.
     * @param tasks The Tasklist object holding tasks currently stored in the 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

No easy-to-detect issues 👍

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions