-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[BSVR-54] Spotless pre-commit hook 추가 (#4)
* build: spotless plugin 추가 * docs : google java code style editorconfig 추가 * build(spotless): commit 찍을 때 자동으로 spotless 돌도록 설정 * build: spotless pre-commit register 수정 * test(pre-commit): spotless pre commit 테스트 * build: 사용하지 않는 build.gradle 블럭 삭제 * build: pre-commit script 수정 * docs: codeowners 추가 * fix: github workflow 디렉터리 이름 오타 수정
- Loading branch information
Showing
10 changed files
with
1,413 additions
and
30 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#!/bin/sh | ||
|
||
PROJECT_ROOT=$(git rev-parse --show-toplevel) | ||
|
||
# part1 | ||
stagedFiles=$(git diff --staged --name-only) | ||
|
||
# part2 | ||
echo "Running spotlessApply. Formatting code..." | ||
cd $PROJECT_ROOT && ./gradlew spotlessApply | ||
|
||
if [ $? -ne 0 ]; then | ||
echo "Spotless apply failed!" | ||
exit 1 | ||
fi | ||
|
||
# part3 | ||
for file in $stagedFiles; do | ||
if test -f "$file"; then | ||
git add $file | ||
fi | ||
done |
Validating CODEOWNERS rules …
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
* @EunjiShin @wjdwnsdnjs13 @pminsung12 |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 4 additions & 6 deletions
10
...src/main/java/org/depromeet/spot/application/sample/controller/request/SampleRequest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,10 @@ | ||
package org.depromeet.spot.application.sample.controller.request; | ||
|
||
import jakarta.validation.constraints.NotBlank; | ||
|
||
import org.hibernate.validator.constraints.Length; | ||
|
||
public record SampleRequest( | ||
@NotBlank(message = "메세지는 공백일 수 없습니다.") | ||
@Length(min = 1, max = 30, message = "메세지는 1~30글자 사이여야 합니다.") | ||
String message | ||
) { | ||
|
||
} | ||
@NotBlank(message = "메세지는 공백일 수 없습니다.") | ||
@Length(min = 1, max = 30, message = "메세지는 1~30글자 사이여야 합니다.") | ||
String message) {} |
6 changes: 1 addition & 5 deletions
6
...c/main/java/org/depromeet/spot/application/sample/controller/response/SampleResponse.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,3 @@ | ||
package org.depromeet.spot.application.sample.controller.response; | ||
|
||
public record SampleResponse( | ||
String message | ||
) { | ||
|
||
} | ||
public record SampleResponse(String message) {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters