Spotless 포맷터 추가 #3
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
추가된 것
Spotless포맷터를 추가하였습니다.기능설명
다음과 같은 규칙으로 코드를 포맷팅합니다.
Java 파일 (src/main/java//*.java, src/test/java//*.java):
eclipse()- Eclipse JDT 포맷터 사용leadingTabsToSpaces(4)- 탭을 4칸 스페이스로 변환importOrder("java", "javax", "org", "com", "")- import 순서: java → javax → org → com → 기타removeUnusedImports()- 사용하지 않는 import 제거endWithNewline()- 파일 끝에 개행 추가trimTrailingWhitespace()- 줄 끝 공백 제거Kotlin Gradle 파일 (*.gradle.kts):
ktlint()- Kotlin 공식 스타일 가이드 적용Spotless 주요 명령어:
./gradlew spotlessApply- 코드 포맷팅 적용./gradlew spotlessCheck- 포맷팅 규칙 위반 검사