Skip to content

UseSingleLinePropertyGetter: respect async and throws on getters #279

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

Conversation

cbjeukendrup
Copy link
Contributor

Resolves: SR-15671

With this patch, the UseSingleLinePropertyGetter rule will take async and throws on getters into account. When one of those is present, the rule won't be applied; otherwise, the semantics would be changed, by removing async and/or throws.
The tests are extended accordingly.

Copy link
Member

@allevato allevato left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks great, thanks for the fix!

@allevato allevato merged commit a5779a2 into swiftlang:main Feb 9, 2022
@cbjeukendrup cbjeukendrup deleted the UseSingleLinePropertyGetter_not_with_async_throws branch February 9, 2022 18:33
mironal added a commit to mironal/TwitterAPIKit that referenced this pull request Feb 18, 2022
allevato added a commit to allevato/swift-format that referenced this pull request Mar 18, 2022
…rtyGetter_not_with_async_throws

UseSingleLinePropertyGetter: respect `async` and `throws` on getters
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