IntelliJ inserts an empty line before the last '}' in class files

I am trying to find an option to insert an empty line before closing the '}' class and did not find it.

My goal is to format

interface IShooter { void incHealth(); // health++ void decHealth(); // health-- int getHealth(); } 

to that

 interface IShooter { void incHealth(); // health++ void decHealth(); // health-- int getHealth(); } 
+7
source share
2 answers

This is not possible with IntelliJ stock. If you go to Settings> Editor> Code Style> Java, then click the Blank Lines tab. you can see a list of options.

As you can see, there is an option for maximum empty lines Before '}' but, unfortunately, not for minimum empty lines.

enter image description here

+6
source

Settings> Editor> Code Style> Java → Empty Lines Tab

Before the end of the lesson: 1

Preview

+1
source

All Articles