📌 줄바꿈, 공백, (콤마· 조건문 혹은 메서드 괄호 위치) 등등

띄어쓰기, 들여쓰기 등등

ctrl + alt + l   // 자동 띄어쓰기
ctrl + alt + o   // 사용하지 않는 import 문 삭제

. 을 사용하는 메소드의 경우 줄 바꿈

.으로 이어지는, 메소드의 경우 . 을 기준으로 줄 바꿈을 한다.

// Good Examples
Post post = Post.builder()
                .title(request.getTitle())
                .build();

//Bad Examples
Post post = Post.builder().title(request.getTitle()).build();

// Good Examples
when(postRepository.save(any()))
                    .thenReturn(mockPost);

//Bad Examples
when(postRepository.save(any())).thenReturn(mockPost);

변수 선언

// Good Examples
int a;
int b;

// Bad Examples
int a, b;

📌 명명 규칙

// Good Examples
public class Hello {
}

// Bad Examples
public class Annyeong {
}

패키지 이름은 소문자로 구성한다.