Skip to content

[SR-13011] swift-format doesn't approve of standard SwiftUI Button trailing closure syntax. #322

Open
@swift-ci

Description

@swift-ci
Previous ID SR-13011
Radar None
Original Reporter leisurehound (JIRA User)
Type Bug

Attachment: Download

Additional Detail from JIRA
Votes 0
Component/s swift-format
Labels Bug
Assignee None
Priority Medium

md5: d94a19ff926d1ac4c036ad3673897328

Issue Description:

In SwiftUI examples, Apple demonstrates how to utilize the action & view closures for the Button element with two trailing closures:

Button(action: {
// do something
}) {
  Text("Label")
}

But swift-format will suggest to revise function calling signature to remove multiple trailing closures.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions