After upgrading from `1.6.0` to `1.7.0` (without d...
# ktlint
p
After upgrading from
1.6.0
to
1.7.0
(without doing any other change). There are a lot of changes when formatting the code like:
Copy code
OLD:
 val updatedDemands = data.demands
      .filterNot { userData ->
          demands.any { <http://it.cat|it.cat> == <http://userData.cat|userData.cat> }
      } + demands.filterNot { it.status == null }

NEW:
 val updatedDemands = data.demands
      .filterNot { userData ->
          demands.any { <http://it.cat|it.cat> == <http://userData.cat|userData.cat> }
      } +
      demands.filterNot { it.status == null }
Which rule is affecting this? Can I disable it?
p
See release notes: Add experimental rule expression-operand-wrapping - #3056, by @Paul Dingemans This rule aligns wrapping of arithmetic and logical multiline expressions. The condition-wrapping rule which did something similar for logical multiline expressions only no longer reports and fixes violations. It will be removed in Ktlint 2.0.
p
Ah okay I did not know that experimental rules are enabled by default and I need to explicitly disable them. Thanks for the hint.
p
Oops, that might be a mistake I made. It was meant to be experimental, so opt-in. I will check that out before the bugfix release is sent out this week.
p
I just checked it. In my project experimental rules are not enabled in the
.editorconfig
and only when explicitly disabled the rule, the code stays as expected.
p
Yeah, I made an error. Probably I forgot to flag the rule properly as experimental. Tnx for confirmation, and for the feedback that revealed this
K 1
p
Thanks 🙏