-
Notifications
You must be signed in to change notification settings - Fork 48
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
chore(format): preserve unused arguments #252
Conversation
Preserve parameter names for better code readability and potential future use. https://github.com/nicklockwood/SwiftFormat/blob/main/Rules.md#unusedarguments
To support Shorthand if let/guard let (since 5.7) and more
af0dd23
to
a1ccc7e
Compare
@ejbills Can you take a look? |
I posted a comment |
I don't see... Please check that it appears to you in incognito mode |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why does this remove returns?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is an automatic removal of SwiftFormat following the fact that I jumped the swift version to 5.10, because implicit return is supported starting from swift 5.9
https://github.com/swiftlang/swift-evolution/blob/main/proposals/0380-if-switch-expressions.md
We can disable the rule, if you want.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, was just curious. Looks good then!
Describe your changes
Preserve parameter names for better code readability and potential future use.
https://github.com/nicklockwood/SwiftFormat/blob/main/Rules.md#unusedarguments
Also, bump the swift version to the latest stable version, and enable Dead Code Stripping (recommended by Xcode).
Related issue number(s) and link(s)
No
Checklist before requesting a review
Core Functionality Changes
No