Skip to content

Add rule to separate case from return statement #493

Open
@pronebird

Description

@pronebird

Currently swift-format would squash case and return statement together like this:

switch self {
    case .primary: return 0
    case .secondary: return 1
}

Ideally it should be able to produce something more readable but I don't see any option to achieve that.

switch self {
    case .primary: 
        return 0
    case .secondary: 
        return 1
}

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