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

chore(format): preserve unused arguments #252

Merged
merged 4 commits into from
Aug 14, 2024

Conversation

ShlomoCode
Copy link
Contributor

@ShlomoCode ShlomoCode commented Aug 12, 2024

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

  • I have performed a self-review of my code
  • If this change affects core functionality, I have added a description highlighting the changes
  • I have followed conventional commit guidelines

Core Functionality Changes

No

@ShlomoCode ShlomoCode force-pushed the preserve-unused-arguments branch from af0dd23 to a1ccc7e Compare August 12, 2024 13:49
@ShlomoCode ShlomoCode changed the title chore: disable SwiftFormat unusedArguments rule chore(format): preserve unused arguments Aug 12, 2024
@ShlomoCode
Copy link
Contributor Author

@ejbills Can you take a look?

@ejbills
Copy link
Owner

ejbills commented Aug 13, 2024

@ejbills Can you take a look?

I posted a comment

@ShlomoCode
Copy link
Contributor Author

ShlomoCode commented Aug 13, 2024

I don't see... Please check that it appears to you in incognito mode
If you comment via GitHub's review, it only appears to you with a "Pending" label until you perform "Finish your review"

Copy link
Owner

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?

Copy link
Contributor Author

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.

Copy link
Owner

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!

@ejbills ejbills merged commit 39f44f0 into ejbills:main Aug 14, 2024
3 checks passed
@ShlomoCode ShlomoCode deleted the preserve-unused-arguments branch August 14, 2024 22:01
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

Successfully merging this pull request may close these issues.

2 participants