New line before if statement
Answered
Hi!
Is it possible to configure in Intelij code style to add a new line before each 'if' statement ?
Example:
I have:
var student = request.getStudent();
/....../ - some code
if (Object.isNull(student)) {
doSmth();
}
what I want:
var student = request.getStudent();
/....../ - some code
if (Object.isNull(student)) {
doSmth();
}
the difference is that in the second variant before if statement there is additional line. I want Intelij to add that line every time I use formatting. It can help when the developer doesnt pay attention on separating some block of codes into logical parts.
I tried code style for Java and .editorconfig and didnt find anything suitable.
Please sign in to leave a comment.
Hello,
Please follow the related request on YouTrack: https://youtrack.jetbrains.com/issue/IDEA-169234/Code-Formatting-Blank-line-beforeafter-control-structures-like-ifwhileswitch-and-after-variable-declarations