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

[SR-11290] Break rule for where clause in swift-format #347

Closed
swift-ci opened this issue Aug 10, 2019 · 1 comment
Closed

[SR-11290] Break rule for where clause in swift-format #347

swift-ci opened this issue Aug 10, 2019 · 1 comment

Comments

@swift-ci
Copy link

Previous ID SR-11290
Radar None
Original Reporter kitasuke (JIRA User)
Type Improvement
Status Closed
Resolution Duplicate
Additional Detail from JIRA
Votes 0
Component/s swift-format
Labels Improvement
Assignee None
Priority Medium

md5: e99e19192fe6acc686e2c167f7f8e7ae

duplicates:

  • SR-11289 Break rule for generic where clause in swift-format

Issue Description:

I assume this is intended, but I thought where clause for `for` and `case` can have `.break(.continue), .open` tokens instead because it's not consistent with `in` keyword in `ForInStmt` for example.

swift-format produces:

for item
  in aVeryLargeContainterObject
where largeObject
  .hasProperty() && condition
{
...
}

Expected:

for item 
  in aVeryLargeContainterObject 
  where largeObject .hasProperty() && condition 
{
...
}

Submitted my draft PR about my ideas:

#34

@allevato
Copy link
Collaborator

Duping to consolidate both where clause issues under a single one.

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
@shahmishal shahmishal transferred this issue from apple/swift May 9, 2022
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants