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

add doc for loop label #386

Merged
merged 1 commit into from
Dec 31, 2024
Merged

add doc for loop label #386

merged 1 commit into from
Dec 31, 2024

Conversation

Yu-zh
Copy link
Collaborator

@Yu-zh Yu-zh commented Dec 25, 2024

#382

Need next release to eliminate the warnings.

Copy link

peter-jerry-ye-code-review bot commented Dec 25, 2024

‼️ This code review is generated by a bot. Please verify the content before trusting it.

Here are a few observations and potential issues from the provided git diff output:

  1. Inconsistent Formatting in continue label Test:

    • In the test "continue label" block, there is a missing space after res = and before outer~:. This inconsistency in formatting could lead to readability issues. It should be let res = outer~: for consistency with other similar constructs in the code.
  2. Missing Newline at End of File:

    • The file next/sources/language/src/controls/top.mbt ends with // end match 1 without a newline character. This is indicated by the \ No newline at end of file message in the diff. While this is not a functional issue, it is a best practice to ensure that files end with a newline to avoid potential issues with certain tools and version control systems.
  3. Potential Redundancy in break label Test:

    • In the test "break label" block, the else clause with -1 seems redundant because the break outer~ j statement will always execute, ensuring that the else clause is never reached. This could be misleading or unnecessary, and it might be worth considering whether the else clause is needed at all.

These are the key observations from the diff. Addressing these issues can improve code readability and maintainability.

@peter-jerry-ye peter-jerry-ye merged commit f88d51f into main Dec 31, 2024
5 of 17 checks passed
@peter-jerry-ye peter-jerry-ye deleted the loop-label branch December 31, 2024 06:26
@peter-jerry-ye peter-jerry-ye linked an issue Dec 31, 2024 that may be closed by this pull request
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.

doc: label for control flows
2 participants