-
Notifications
You must be signed in to change notification settings - Fork 440
Enable some nice-to-have code formatting rules #3110
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
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.
LGTM. Could you enable the same rules in SourceKit-LSP and swift-format to keep the formatting in those repositories consistent?
@swift-ci please test |
|
||
// This only makes sense void functions | ||
if funcDecl.signature.returnClause?.type.as(IdentifierTypeSyntax.self)?.name.text != "Void" { | ||
if let returnClause = funcDecl.signature.returnClause, | ||
returnClause.type.as(IdentifierTypeSyntax.self)?.name.text != "Void" | ||
{ | ||
throw CustomError.message( | ||
"@addAsync requires an function that returns void" | ||
) |
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.
@ahoppen Had to adjust this because the macro was complaining about a nil result clause not being Void
.
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.
Thanks for adjusting it. Looks good to me.
@swift-ci please test |
@swift-ci please test Windows |
No description provided.