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

Splits: handle braces within if/for/while better #4860

Merged
merged 2 commits into from
Mar 6, 2025

Conversation

kitbellew
Copy link
Collaborator

Previously, we'd assume that a brace within if or while contains the entire condition and let the brace rules handle it; however, this brace could enclose only a part of the condition and hence needs to be handled differently then.

Additionally, we ignored the danglingParentheses.ctrlSite parameter in these cases as well.

Helps with #4859.

Previously, we'd assume that a brace within `if` or `while` contains the
entire condition and let the brace rules handle it; however, this brace
could enclose only a part of the condition and hence needs to be handled
differently then.

Additionally, we ignored the danglingParentheses.ctrlSite parameter in
these cases as well.
@kitbellew kitbellew merged commit 6add804 into scalameta:main Mar 6, 2025
22 checks passed
@kitbellew kitbellew deleted the 4859_1 branch March 6, 2025 17:54
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