You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
def action1(userId: String) = Action.async(parse.json) {
request =>
for {
su <- request.body.validate[StatusUpdate] ?| BadRequest(JsError.toFlatJson(_:ActionDSL.JsErrorContent))
user <- SomeService.findUser(userId) ?| NotFound
_ <- SomeService.performUpdate(user, su) ?| Conflict
} yield NoContent
}
I would like to align the ?| operator vertically. Just like the => of case statement in pattern matching.
More generally, I want to align vertically every custom operator I will use.
Is it possible ?
If not I'll be glad to help you write it but I need some doc / explaination about how scalariform is working internally
This case also applies to the following simple case;
Map(
one -> 1,
two -> 2,
three -> 3)
becomes
Map(
one -> 1,
two -> 2,
three -> 3)
When the length of each key and value becomes large, it degrades readability.
I know If you want the code 'as is', you can write directive "// format: OFF" and "//format: ON" ( https://github.com/daniel-trinh/scalariform#format-onoff ),
but this additional rule is annoying. (comment should be used only for code, not to the external tools.)
From @Driox on December 7, 2015 14:39
I use PlayMonadicAction (https://github.com/Kanaka-io/play-monadic-actions) and I write this kins of code
I would like to align the ?| operator vertically. Just like the => of case statement in pattern matching.
More generally, I want to align vertically every custom operator I will use.
Is it possible ?
If not I'll be glad to help you write it but I need some doc / explaination about how scalariform is working internally
Copied from original issue: daniel-trinh#97
The text was updated successfully, but these errors were encountered: