Skip to content

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

@nus-se-bot

Description

@nus-se-bot

@chuashihong 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/main/Storage.java lines 80-80:

            boolean done;

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/main/Duke.java lines 9-9:

//import javafx.application.Application;

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

//import javafx.scene.Scene;

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

//import javafx.scene.control.Button;

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/command/Command.java lines 21-27:

    /**
     * Execute the command according to the user's input
     *
     * @param taskList currentTaskList
     * @param ui ui class that helps to print suitable command
     * @param storage storage that manage saving and loading data
     */

Example from src/main/java/duke/command/Command.java lines 30-33:

    /**
     * Check if the command is ByeCommand
     * @return false by default, only when it is bye, it returns true
     */

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

    /**
     * Main method to activate chatbot
     *
     * @throws IOException error when saving to the data file
     */

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 62323ca:

Added GUI in Duke

  • Not in imperative mood (?)

possible problems in commit 7e89649:

Level-9

  • Perhaps too short (?)

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

ℹ️ 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.

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