Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
thomasvl opened this issue Sep 23, 2024 · 1 comment

Comments

@thomasvl
Copy link

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.

@ahoppen
Copy link
Member

ahoppen commented Sep 24, 2024

Synced to Apple’s issue tracker as rdar://136555297

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants