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

Fix void_return rule to support async and async throws functions #4772

Merged
merged 1 commit into from
Feb 17, 2023

Conversation

lo1tuma
Copy link
Contributor

@lo1tuma lo1tuma commented Feb 17, 2023

This fixes #4766. I’ve noticed there is also #4158 which rewrites the whole rule to use SwiftSyntax, which would be also sufficient to fix the issue. But this PR adds additional test cases for the async and async throws functions, so I think we can use this fix for now and consider #4158 as a long-term solution, which should hopefully also pass the new tests.

Fixes: #4766
Refs: #4158

@SwiftLintBot
Copy link

SwiftLintBot commented Feb 17, 2023

18 Messages
📖 Linting Aerial with this PR took 0.23s vs 0.23s on main (0% slower)
📖 Linting Alamofire with this PR took 0.25s vs 0.26s on main (3% faster)
📖 Linting Brave with this PR took 1.55s vs 1.54s on main (0% slower)
📖 Linting DuckDuckGo with this PR took 0.62s vs 0.62s on main (0% slower)
📖 Linting Firefox with this PR took 1.35s vs 1.35s on main (0% slower)
📖 Linting Kickstarter with this PR took 1.83s vs 1.8s on main (1% slower)
📖 Linting Moya with this PR took 0.14s vs 0.14s on main (0% slower)
📖 Linting NetNewsWire with this PR took 0.62s vs 0.63s on main (1% faster)
📖 Linting Nimble with this PR took 0.16s vs 0.16s on main (0% slower)
📖 Linting PocketCasts with this PR took 1.33s vs 1.34s on main (0% faster)
📖 Linting Quick with this PR took 0.09s vs 0.09s on main (0% slower)
📖 Linting Realm with this PR took 0.97s vs 0.98s on main (1% faster)
📖 Linting SourceKitten with this PR took 0.13s vs 0.13s on main (0% slower)
📖 Linting Sourcery with this PR took 0.42s vs 0.42s on main (0% slower)
📖 Linting Swift with this PR took 1.22s vs 1.21s on main (0% slower)
📖 Linting VLC with this PR took 0.33s vs 0.33s on main (0% slower)
📖 Linting Wire with this PR took 1.72s vs 1.73s on main (0% faster)
📖 Linting WordPress with this PR took 2.26s vs 2.27s on main (0% faster)

Generated by 🚫 Danger

Copy link
Collaborator

@SimplyDanny SimplyDanny left a comment

Choose a reason for hiding this comment

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

Thanks! The fix looks good to me.

@SimplyDanny SimplyDanny merged commit 352ffdf into realm:main Feb 17, 2023
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.

Incorrect problem detected by void_return rule when returning async functions
3 participants