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

hongbo/linked hashset test #1112

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

bobzhang
Copy link
Contributor

@bobzhang bobzhang commented Oct 12, 2024

  • failed: the location of first argument cannot be None

cc @lijunchen

Copy link

peter-jerry-ye-code-review bot commented Oct 12, 2024

Observed Problems in linked_hash_set_test.mbt

  1. Comment Misplacement: The commented line (// @json.inspect!([..h])) has been uncommented and moved to the next line (@json.inspect!([..h])). This change might not be intentional, and it's important to ensure that this line is supposed to be executed as code. If it's for debugging purposes and you wish to keep it as a comment, revert it back to a comment.

  2. Potential Redundancy: The line @json.inspect!([..h]) might be redundant since you are already inspecting v right after it, and v is set to [..h]. If the intention was to inspect the set before converting it to an array, it would make more sense to keep both lines. However, if inspecting the array v is sufficient, consider removing @json.inspect!([..h]) to avoid redundant outputs.

  3. Syntax in Comments: Ensure that any code-like syntax within comments is purely for documentation purposes and does not mislead future developers into thinking it's executable code. In this case, it seems like a debugging statement was commented out and then uncommented, which could lead to confusion if not properly documented.

Suggestions

  • Review Debugging Statements: Ensure that all debugging statements (like @json.inspect!) are necessary and serve a clear purpose. If they are no longer needed, remove them to keep the code clean and free of potential clutter.

  • Document Changes: If the uncommenting of @json.inspect!([..h]) was intentional, add a comment explaining why this line is necessary or what it helps to debug. This will aid in understanding the code better in the future.

  • Check for Redundancy: If the output of @json.inspect!([..h]) is the same as @json.inspect!(v, content=[1, 2, 3, 4, 5]), consider removing the former to avoid redundant outputs in the testing phase.

These observations and suggestions aim to enhance clarity, reduce redundancy, and ensure that debugging statements are both necessary and well-documented.

@bobzhang bobzhang force-pushed the hongbo/linked_hashset_test branch from 3c9987e to 4a5c7c2 Compare October 12, 2024 06:58
@lijunchen
Copy link
Contributor

lijunchen commented Oct 12, 2024

The array spread's location info looks lost; I've filed an issue in moonc repo.

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

Successfully merging this pull request may close these issues.

2 participants