Skip to content

Guard let in blocks is merged into the same line #494

Closed
@pronebird

Description

@pronebird

Swift-format does not add newline before guard statement in closures which is incredibly weird:

myObject.didFinish = { [weak self] in guard let self = self else { return }

    self.didFinish?(self)
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions