Skip to content

Do not warn when loop body is empty#1476

Merged
bakpakin merged 1 commit into
janet-lang:masterfrom
sogaiu:no-warning-for-empty-body-loop
Jul 18, 2024
Merged

Do not warn when loop body is empty#1476
bakpakin merged 1 commit into
janet-lang:masterfrom
sogaiu:no-warning-for-empty-body-loop

Conversation

@sogaiu
Copy link
Copy Markdown
Contributor

@sogaiu sogaiu commented Jul 18, 2024

This PR removes the warning in loop for an empty body.

Although it is nice to check for an empty body in seq, catseq, tabseq, and generate, in the case of loop, there are legitimate uses for having an empty body.

An example from the wild and some discussion can be seen here.

Copy link
Copy Markdown
Member

@pepe pepe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It makes sense to me and LGTM.

@bakpakin bakpakin merged commit 9eab57d into janet-lang:master Jul 18, 2024
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.

3 participants