Closed findepi closed 9 months ago
I experience this in all recent Intellij versions. How do i go about diagnosing that?
Look at the codestyle options and try to see which one is causing that? Maybe they introduced a new option that's defaulting to some other setting...
FWIW, I'm running IntelliJ 2023.3.2 and I don't experience the problem there.
i already tried that, but didn't find an option for this. i am still at 2023.2.x (because 2023.3.2 did not appear to work stably for me), but will try 2023.3.2 (ultimate) too
switching to 2023.3.2 and importing https://github.com/airlift/codestyle/blob/master/IntelliJIdea2019/Airlift.xml anew did not make intellij retain code as is upon auto-formatting
Runnable r = () -> { throw new RuntimeException(); }
is there any additional configuration i should set to make it work?
Do you have Spaces->Within->Code Braces turned on?
Do you have Spaces->Within->Code Braces turned on?
this indeed helps!
Current checkstyle rules somehow allow things like
however, when such code is then auto-formatted by IntelliJ with Airbase codestyle, some whitespace is removed, resulting in a code that violates checkstyle rules. This state is undesired: sometimes a person working on a class file may need to undo auto-formatting so pass checkstyle checks.
The new rules aim to reduce such situation by recognizing some common would-format-incorrectly patterns.