Skip to content

Commit

Permalink
[feature/#218]SpotlessApply - Github action 검사 적용
Browse files Browse the repository at this point in the history
  • Loading branch information
whitem4rk authored Jan 17, 2024
2 parents 73b64b7 + 42ba029 commit b97ea44
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 6 deletions.
21 changes: 21 additions & 0 deletions .github/workflows/spotless-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Spotless Check

on: [push, pull_request]

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Set up JDK 11
uses: actions/setup-java@v2
with:
java-version: '11'
distribution: 'adopt'

- name: Grant execute permission for gradlew
run: chmod +x ./gradlew

- name: Run Spotless Check
run: ./gradlew spotlessCheck
14 changes: 8 additions & 6 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,15 @@ spotless {
java {
// 모든 Java 소스 파일에 포맷팅 규칙 적용
target("**/*.java")
// space로 4칸 들여쓰기 사용
indentWithSpaces(4)
// 파일의 끝에 새 줄 추가
endWithNewline()
// 사용되지 않는 import 제거
// google 자바 포맷 적용
googleJavaFormat()
// 불필요한 임포트 제거
removeUnusedImports()
//import 순서 지정
// 마지막줄 New Line 처리
endWithNewline()
// 공백 제거
trimTrailingWhitespace()
//임포트 순서 정리
importOrder(
"java",
"javax",
Expand Down

0 comments on commit b97ea44

Please sign in to comment.