diktat
diktat copied to clipboard
LineLength rule does wrong formatting
Here is an example:
fun test() {
val foo = (hasExplicitNotUnitReturnType || isFunWithExpressionBody && !hasExplicitUnitReturnType && hasNotExpressionBodyTypes)
&& !hasReturnKdoc && !isReferenceExpressionWithSameName
}
which is transformed to this code (in LineLength):
fun test() {
val foo = (hasExplicitNotUnitReturnType || isFunWithExpressionBody && !hasExplicitUnitReturnType &&
hasNotExpressionBodyTypes)
&& !hasReturnKdoc && !isReferenceExpressionWithSameName
}
To my mind it should be something like that:
fun test() {
val foo = (hasExplicitNotUnitReturnType || isFunWithExpressionBody && !hasExplicitUnitReturnType &&
hasNotExpressionBodyTypes) && !hasReturnKdoc && !isReferenceExpressionWithSameName
}
(for 120 characters)
not critical at all