openrewrite / rewrite-static-analysis

OpenRewrite recipes for identifying and fixing static analysis issues.
Apache License 2.0
27 stars 43 forks source link

`OperatorWrap` and `WrappingAndBraces` causing wrong result for Kotlin #302

Open SettingDust opened 3 weeks ago

SettingDust commented 3 weeks ago

What version of OpenRewrite are you using?

I am using

How are you running OpenRewrite?

Gradle. Single Module https://github.com/SettingDust/TheAbyss

What is the smallest, simplest way to reproduce the problem?

https://discord.com/channels/996548279191998535/996548280118935674/1249202116883513425 Run the rewrite with gradle.

  1. 图片
  2. 图片

What did you expect to see?

  1. 图片
  2. No

What did you see instead?

  1. 图片
  2. 图片 图片

Are you interested in contributing a fix to OpenRewrite?

No

timtebeek commented 3 weeks ago

Thanks for reporting your issue here as well @SettingDust ! Definitely something to fix such that these recipes just work for Kotlin too.