ctrl + alt + l
팀원 모두가 IntelliJ의, 위 단축키를 활용해서 통일성을 지킨다.
.
을 사용하는 메서드의 경우 줄바꿈.
으로 이어지는, 메서드의 경우 .
을 기준으로 줄바꿈을 한다.
// 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;