Skip to content

_lint_ flags things for _OmitExplicitReturns_ but _format_ doesn't fix them #812

@thomasvl

Description

@thomasvl

With a dummy test file:

var f = l.filter { return $0.a != o }

And a config file that includes:

    "OmitExplicitReturns" : true,
swift format lint --configuration swift-format.cfg test.swift

Produces:

test.swift:1:20: warning: [OmitExplicitReturns] 'return' can be omitted because body consists of a single expression

However

swift format format --configuration swift-format.cfg test.swift

Doesn't actually return the return in what it produces.

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