Skip to content

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

@soc-se-script

Description

@soc-se-script

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

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/Natsbot.java lines 71-75:

    /**
     * Main method to launch the Natsbot application.
     *
     * @param args command line arguments
     */

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 ed99a55:


Add support for deleting and marking multiple tasks at once

Currently, the delete and mark commands only handle a single task at a time. This limits the efficiency of task management, especially when users need to update multiple tasks simultaneously.

Allowing 'delete' and 'mark' commands to take multiple indices will enhance the user experience by enabling batch operations, reducing the number of commands needed to manage multiple tasks.

Let's:

1. Replace the parseIndex method in CommandParser, which returned a single integer, with parseIndices, which returns a list of integers. This allows parsing multiple indices from the user input.
2. Modify the DeleteCommand and MarkCommand classes to handle multiple indices instead of just one, allowing batch operations for marking and deleting tasks.
3. Update Ui methods showTaskDeleted and showTaskMarked to accept a response string, enabling proper display of messages when multiple tasks are modified.


  • body not wrapped at 72 characters: e.g., Currently, the delete and mark commands only handle a single task at a time. This limits the efficiency of task management, especially when users need to update multiple tasks simultaneously.

possible problems in commit 0d39dee:


Add support for tasks that need to be done after a specific time

Currently, the application does not support tasks that are dependent on specific events or times. This limits the ability to manage tasks that need to be done after a specific time, or after another task or event has occurred.

Adding support for "DoAfter" enables users to specify tasks that are to be completed only after a particular time or event, enhancing task management.

Let's:

1. Create a new DoAfter class to represent tasks that should be done after a specified event or time.
2. Update the CommandParser to parse the new /after syntax and create DoAfterTask instances.
3. Integrate the new task type into the existing command structure to ensure that it is correctly handled and displayed.


  • body not wrapped at 72 characters: e.g., Currently, the application does not support tasks that are dependent on specific events or times. This limits the ability to manage tasks that need to be done after a specific time, or after another task or event has occurred.

possible problems in commit f8a6ada:


Set up Continuous Integration (CI) using Github Actions

Currently, the project does not have an automated CI pipeline. This could lead to inconsistent testing and delayed feedback on code quality.

Setting up CI with Github Actions automates the build, test, and validation processes. This ensures code changes are continuously verified and meet quality standards before merging.

Let's:

1. Add a .yml configuration file to define the CI workflow using GitHub Actions.
2. Set up automated triggers on pull requests and commits to run build and test jobs, providing immediate feedback on code changes.


  • body not wrapped at 72 characters: e.g., Currently, the project does not have an automated CI pipeline. This could lead to inconsistent testing and delayed feedback on code quality.

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

Suggestion: Avoid committing binary files (e.g., *.class, *.jar, *.exe) or third-party library files in to the repo.


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