-
-
Notifications
You must be signed in to change notification settings - Fork 53
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
swift-format experiments #617
base: main
Are you sure you want to change the base?
Conversation
Running
|
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.
I like this a lot, just one thing that's annoying IMO. But I can live with it if it's not fixable
|
||
extension JSONEncoder: ResponseEncoder { | ||
/// Extend JSONEncoder to support encoding `Response`'s. Sets body and header values | ||
/// - Parameters: | ||
/// - value: Value to encode | ||
/// - request: Request used to generate response | ||
/// - context: Request context | ||
public func encode(_ value: some Encodable, from request: Request, context: some RequestContext) throws -> Response { | ||
public func encode(_ value: some Encodable, from request: Request, context: some RequestContext) throws -> Response | ||
{ |
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 type of formatting is super annoying, is that configurable?
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.
Yeah I haven't worked out how to stop that. Not very keen on it
@@ -18,7 +18,8 @@ extension URLEncodedFormEncoder: ResponseEncoder { | |||
/// - value: Value to encode | |||
/// - request: Request used to generate response | |||
/// - context: Request context | |||
public func encode(_ value: some Encodable, from request: Request, context: some RequestContext) throws -> Response { | |||
public func encode(_ value: some Encodable, from request: Request, context: some RequestContext) throws -> Response | |||
{ |
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.
"
Experimenting with moving to swift-format
So far I copied the .swift-format from swift-nio and ran swift format on the Tests and Sources folders