Skip to content

Only rewrite multi-body when/unless expressions to loop keywords#792

Merged
jackfirth merged 1 commit into
masterfrom
when-unless-keyword-multi-body-only
Jul 7, 2026
Merged

Only rewrite multi-body when/unless expressions to loop keywords#792
jackfirth merged 1 commit into
masterfrom
when-unless-keyword-multi-body-only

Conversation

@jackfirth

@jackfirth jackfirth commented Jul 7, 2026

Copy link
Copy Markdown
Owner

Fixes #765.

The when-expression-in-for-loop-to-when-keyword and
unless-expression-in-for-loop-to-unless-keyword rules rewrote any
when or unless expression wrapping a loop body, including ones with
a single body form. Rewriting those doesn't meaningfully reduce
indentation or improve the code, so now the rules only fire when the
when or unless expression has multiple body forms.

Fixes #765.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Resyntax analyzed 2 files in this pull request and found no issues.

@jackfirth jackfirth enabled auto-merge (squash) July 7, 2026 08:08
@jackfirth jackfirth merged commit 908df66 into master Jul 7, 2026
5 checks passed
@jackfirth jackfirth deleted the when-unless-keyword-multi-body-only branch July 7, 2026 08:08
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.

Only use #:when and #:unless with multi-body loops

1 participant