Skip to content

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

Description

@soc-se-script

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

No easy-to-detect issues 👍

Aspect: Recent Git Commit Messages

possible problems in commit 3c347db:


bug fix: Correct commandType handling for mark/unmark/delete

Previously, using commandType.name() (all caps) caused unknown command exceptions
in getMarkOrDeleteCommand because the switch statement expected lowercase strings.

Let's update Parser's getMarkOrDeleteCommand to switch directly on CommandType,
and use commandType.name().toLowerCase() for error messages. This ensures proper
matching and eliminates unexpected errors.


  • body not wrapped at 72 characters: e.g., Previously, using commandType.name() (all caps) caused unknown command exceptions

possible problems in commit 0cd43ca:


BCD-Extension: Add alias commands and integrate CommandType enum

Magic string literals are used for command matching and dispatch across
the codebase, weakening extensibility and maintainability.

Let's,
* integrate CommandType into alias mapping and command parsing logic.
* add set-alias/list-alias functionality with enum-based validation.
* clean up inconsistent error messages and relocate message constants to their respective Command classes.

These changes enable consistent command handling, prepare for future alias
system expansion and improve error message uniformity.

Custom aliases are not yet persistent across program runs.


  • body not wrapped at 72 characters: e.g., * clean up inconsistent error messages and relocate message constants to their respective Command classes.

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