What's the level support for context receivers in ...
# ktlint
d
What's the level support for context receivers in ktlint? Currently, ktlint accepts this formatting:
Copy code
fun fetchStandingOrdersAuths(info: RequestOriginInfo, productHashedId: String): CustomerRelevantOperationsResponse =
        fetchStandingOrdersAuths(info, setOf(productHashedId))
But once I "annotate" that with
context(Raise<ApiError>)
like this
Copy code
context(Raise<ApiError>)
    fun fetchStandingOrdersAuths(info: RequestOriginInfo, productHashedId: String): CustomerRelevantOperationsResponse =
        fetchStandingOrdersAuths(info, setOf(productHashedId))
it reports that "First line of body expression fits on same line as function signature (standard:function-signature" rule is violated.
p
Please raise an issue, and include your
.editorconfig
d
It's worth noting that context receivers are going away (to be replaced by context parameters).
d
p
It's worth noting that context receivers are going away (to be replaced by context parameters). (edited)
@Daniel Pitts Tnx for info. But ktlint still will need to support this for a while because people can still use older kotlin versus that did support context receivers.
nod 1
d
Yeah, and I expect that context parameters will behave quite similarly with respect to my issue (and perhaps formatting in general).