Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

✨[Feature] checkstyle 적용 #517

Merged
merged 12 commits into from
Jan 27, 2024
Merged

Conversation

middlefitting
Copy link
Member

@middlefitting middlefitting commented Jan 20, 2024

📌 개요

  • 기존 lint를 사용하지 않는 프로젝트로 인해 코드 스타일이 일관적이지 않은 부분이 존재합니다.
  • naver convention을 현재 프로젝트에 적용시키고 gradle task를 통한 ci를 진행해 모든 구성원이 해당 내용을 준수하도록 강제합니다.
  • 기존 코드에 대해서도 CI 성공을 위해 프로젝트에 존재하는 전체 코드를 컨벤션에 맞게 수정합니다.
  • 파일을 배치하였지만 적용을 위해서는 구성원들이 약간의 설정을 해주어야 합니다. 아래 주소의 D.2.7 까지 참고하시면 됩니다.
    https://naver.github.io/hackday-conventions-java/#intellij-formatter

💻 작업사항

  • 프로젝트에 naver convention 적용
  • 프로젝트 루트에 convention 파일 배치
  • naver-checkstyle-rules AbbreviationAsWordInName 커스터마이징
  • .editorconfig 파일 추가
  • .gitattributes eol=lf 로 설정
  • 체크스타일 gradle 태스크 추가 및 editorconfig 연동
  • 체크스타일 검증용 github ci 추가
  • 전체 프로젝트 코드 컨벤션에 맞게 수정

💡Issue 번호

@middlefitting middlefitting linked an issue Jan 20, 2024 that may be closed by this pull request
1 task
@middlefitting middlefitting marked this pull request as draft January 20, 2024 11:11
@middlefitting middlefitting force-pushed the 515-feature-checkstyle-적용 branch from 2a6a5d3 to 5591c6b Compare January 20, 2024 11:18
@codecov-commenter
Copy link

codecov-commenter commented Jan 20, 2024

Codecov Report

Attention: 694 lines in your changes are missing coverage. Please review.

Comparison is base (3193717) 10.25% compared to head (72f0b70) 70.10%.
Report is 8 commits behind head on dev.

Files Patch % Lines
...erver/domain/noti/service/sns/SlackbotService.java 7.04% 66 Missing ⚠️
...com/gg/server/domain/item/service/ItemService.java 12.28% 46 Missing and 4 partials ⚠️
...gg/server/admin/user/service/UserAdminService.java 44.57% 44 Missing and 2 partials ⚠️
...min/tournament/service/TournamentAdminService.java 81.48% 15 Missing and 15 partials ⚠️
...com/gg/server/domain/game/service/GameService.java 72.89% 14 Missing and 15 partials ⚠️
...erver/admin/season/service/SeasonAdminService.java 70.21% 10 Missing and 18 partials ⚠️
...gg/server/admin/game/service/GameAdminService.java 72.36% 11 Missing and 10 partials ⚠️
...ver/domain/megaphone/service/MegaphoneService.java 56.25% 16 Missing and 5 partials ⚠️
...ver/admin/user/controller/UserAdminController.java 51.35% 17 Missing and 1 partial ⚠️
.../gg/server/domain/match/utils/MatchCalculator.java 60.46% 10 Missing and 7 partials ⚠️
... and 81 more
Additional details and impacted files
@@              Coverage Diff              @@
##                dev     #517       +/-   ##
=============================================
+ Coverage     10.25%   70.10%   +59.84%     
- Complexity       78      831      +753     
=============================================
  Files           255      255               
  Lines          3812     3974      +162     
  Branches        357      365        +8     
=============================================
+ Hits            391     2786     +2395     
+ Misses         3410      974     -2436     
- Partials         11      214      +203     
Flag Coverage Δ
integrationTest 69.70% <70.22%> (?)
unitTest 14.34% <9.07%> (+4.08%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@middlefitting middlefitting self-assigned this Jan 20, 2024
@middlefitting middlefitting added the enhancement New feature or request label Jan 20, 2024
@middlefitting middlefitting force-pushed the 515-feature-checkstyle-적용 branch 5 times, most recently from 3b73401 to 3777ee4 Compare January 20, 2024 17:50
@middlefitting middlefitting marked this pull request as ready for review January 20, 2024 18:11
@middlefitting middlefitting changed the title 515 feature checkstyle 적용 ✨[Feature] checkstyle 적용 Jan 20, 2024
Kimhan-nah
Kimhan-nah previously approved these changes Jan 22, 2024
Copy link
Member

@Kimhan-nah Kimhan-nah left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

.editorconfig, naver-checkstyle-rules.xml, naver-checkstyle-suppressions.xml, naver-intellij-formatter.xml 모두 디폴트 설정 파일과 동일하죠? 커스텀한 내용이 있나요?

Comment on lines +14 to +15
[*.bat]
end_of_line = crlf
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

.gitattributes에도 *.bat에 대해 crlf 설정을 추가해야될 것 같습니다

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

넵 추가 완료했습니다!

@middlefitting
Copy link
Member Author

.editorconfig, naver-checkstyle-rules.xml, naver-checkstyle-suppressions.xml, naver-intellij-formatter.xml 모두 디폴트 설정 파일과 동일하죠? 커스텀한 내용이 있나요?

naver-checkstyle-rules.xml 파일은 AbbreviationAsWordInName 대문자 규칙으로 커스터마이징을 진행했습니다.

AYoungSn
AYoungSn previously approved these changes Jan 27, 2024
Copy link
Contributor

@AYoungSn AYoungSn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

확인했습니다

@middlefitting middlefitting dismissed stale reviews from AYoungSn and Kimhan-nah via 1c5743e January 27, 2024 11:17
@middlefitting middlefitting force-pushed the 515-feature-checkstyle-적용 branch from 1c5743e to 5bfc54c Compare January 27, 2024 12:40
@middlefitting middlefitting force-pushed the 515-feature-checkstyle-적용 branch from 5bfc54c to 72f0b70 Compare January 27, 2024 12:47
@middlefitting middlefitting merged commit 191beb3 into dev Jan 27, 2024
2 checks passed
@middlefitting middlefitting deleted the 515-feature-checkstyle-적용 branch January 27, 2024 12:55
Newsujin pushed a commit that referenced this pull request Feb 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

✨ [Feature] checkstyle 적용
4 participants