Skip to content

Request: Force return in functions or variables #582

Closed
@kimdv

Description

@kimdv

This is an opinionated rule, so it should be opt-in.

But a rule that enforces return.

Based in this discussion I think it could be a nice fit.

Triggers

func foo() -> String {
"bar"
}
func foo: String {
"bar"
}

Non-triggers

func foo() -> String {
return "bar"
}
func foo() -> Void {
someApiCall()
}
func foo() {
someApiCall()
}
func foo: String {
return "bar"
}

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