-
Notifications
You must be signed in to change notification settings - Fork 0
[Style] 전체 프로젝트 Reformat #41
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
Conversation
|
Caution Review failedThe pull request is closed. 📝 WalkthroughWalkthrough프로젝트 전반의 코드 포매팅 및 들여쓰기를 정규화하고, import 문 순서를 정렬하며, REST Docs 설정에서 정적 import를 명시적으로 변경하는 정리 작업입니다. 동작 또는 공개 API 변경은 없습니다. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related issues
Possibly related PRs
Poem
✨ Finishing touches
📜 Recent review detailsConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro 📒 Files selected for processing (8)
Comment |
Summary of ChangesHello @kyeoungwoon, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! 이 Pull Request는 프로젝트 전반에 걸쳐 코드 포맷팅을 일관되게 적용하여 코드의 가독성과 유지보수성을 개선하는 것을 목표로 합니다. 주로 공백, 들여쓰기, 줄 바꿈 및 import 문 정렬과 같은 스타일 관련 변경사항으로 구성되어 있으며, 기능적인 변경은 포함되어 있지 않습니다. Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
전체적으로 프로젝트의 코드 포맷을 정리하는 PR이네요. 대부분의 변경 사항은 코드 스타일을 일관성 있게 만들어주어 가독성을 높이는 데 도움이 됩니다. 다만, docs/RBAC_구현_가이드.md 문서의 일부 코드 블록에서 자동 포맷팅으로 인해 오히려 가독성이 떨어지는 부분이 발견되었습니다. 해당 부분들에 대한 수정을 제안합니다.
| MemberPrincipal { | ||
| memberId: 123, | ||
| memberRole: MEMBER, | ||
| currentChallengerId: 456, | ||
| challengerRoles: [SCHOOL_PRESIDENT, SCHOOL_PART_LEADER], | ||
| memberId: | ||
| 123, | ||
| memberRole:MEMBER, | ||
| currentChallengerId:456, | ||
| challengerRoles: [SCHOOL_PRESIDENT, SCHOOL_PART_LEADER], | ||
|
|
||
| // getAuthorities() 결과 | ||
| authorities: [ | ||
| "ROLE_MEMBER", // hasRole('MEMBER')로 체크 | ||
| "SCHOOL_PRESIDENT", // hasAuthority('SCHOOL_PRESIDENT')로 체크 | ||
| "SCHOOL_PART_LEADER" // hasAuthority('SCHOOL_PART_LEADER')로 체크 | ||
| "ROLE_MEMBER", // hasRole('MEMBER')로 체크 | ||
| "SCHOOL_PRESIDENT", // hasAuthority('SCHOOL_PRESIDENT')로 체크 | ||
| "SCHOOL_PART_LEADER" // hasAuthority('SCHOOL_PART_LEADER')로 체크 | ||
| ] | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
이 코드 블록의 포맷이 깨져서 가독성이 떨어집니다. memberId: 123과 같이 각 속성을 한 줄에 명확하게 표시하는 것이 더 좋아 보입니다. 이전 포맷으로 되돌리거나 아래와 같이 수정하는 것을 제안합니다.
| MemberPrincipal { | |
| memberId: 123, | |
| memberRole: MEMBER, | |
| currentChallengerId: 456, | |
| challengerRoles: [SCHOOL_PRESIDENT, SCHOOL_PART_LEADER], | |
| memberId: | |
| 123, | |
| memberRole:MEMBER, | |
| currentChallengerId:456, | |
| challengerRoles: [SCHOOL_PRESIDENT, SCHOOL_PART_LEADER], | |
| // getAuthorities() 결과 | |
| authorities: [ | |
| "ROLE_MEMBER", // hasRole('MEMBER')로 체크 | |
| "SCHOOL_PRESIDENT", // hasAuthority('SCHOOL_PRESIDENT')로 체크 | |
| "SCHOOL_PART_LEADER" // hasAuthority('SCHOOL_PART_LEADER')로 체크 | |
| "ROLE_MEMBER", // hasRole('MEMBER')로 체크 | |
| "SCHOOL_PRESIDENT", // hasAuthority('SCHOOL_PRESIDENT')로 체크 | |
| "SCHOOL_PART_LEADER" // hasAuthority('SCHOOL_PART_LEADER')로 체크 | |
| ] | |
| } | |
| MemberPrincipal { | |
| memberId: 123, | |
| memberRole: MEMBER, | |
| currentChallengerId: 456, | |
| challengerRoles: [SCHOOL_PRESIDENT, SCHOOL_PART_LEADER], | |
| // getAuthorities() 결과 | |
| authorities: [ | |
| "ROLE_MEMBER", // hasRole('MEMBER')로 체크 | |
| "SCHOOL_PRESIDENT", // hasAuthority('SCHOOL_PRESIDENT')로 체크 | |
| "SCHOOL_PART_LEADER" // hasAuthority('SCHOOL_PART_LEADER')로 체크 | |
| ] | |
| } |
| // 1. Subject Attributes (주체 속성) | ||
| principal.memberId | ||
| principal.memberRole (ADMIN, MEMBER) | ||
| principal. | ||
|
|
||
| memberRole(ADMIN, MEMBER) | ||
|
|
||
| principal.currentChallengerId | ||
| principal.challengerRoles (SCHOOL_PRESIDENT, etc.) | ||
| principal. | ||
|
|
||
| challengerRoles(SCHOOL_PRESIDENT, etc .) | ||
|
|
||
| principal.currentGisuId | ||
|
|
||
| // 2. Resource Attributes (리소스 속성) | ||
| post.authorId | ||
| post.organizationId | ||
| notice.scope (GLOBAL, ORGANIZATION, PERSONAL) | ||
| notice. | ||
|
|
||
| scope(GLOBAL, ORGANIZATION, PERSONAL) | ||
|
|
||
| activity.deadline | ||
| schedule.attendanceWindow | ||
|
|
||
| // 3. Environment Attributes (환경 속성) | ||
| LocalDateTime.now() | ||
| LocalDateTime. | ||
|
|
||
| now() | ||
|
|
||
| request.location | ||
| request.ipAddress | ||
| request.ipAddress | ||
|
|
||
| // 4. Action Attributes (행위 속성) | ||
| READ, CREATE, UPDATE, DELETE | ||
| APPROVE, REJECT | ||
| SUBMIT, REVIEW | ||
| READ, CREATE, UPDATE, DELETE | ||
| APPROVE, | ||
| REJECT | ||
| SUBMIT, REVIEW | ||
| ``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ABAC 속성을 설명하는 이 코드 블록의 포맷이 깨져 가독성이 매우 낮습니다. 예를 들어 principal.memberRole이 여러 줄로 나뉘어 있고, 들여쓰기가 일관되지 않습니다. 원래의 간결한 형태로 되돌리는 것이 좋겠습니다.
// 1. Subject Attributes (주체 속성)
principal.memberId
principal.memberRole (ADMIN, MEMBER)
principal.currentChallengerId
principal.challengerRoles (SCHOOL_PRESIDENT, etc.)
principal.currentGisuId
// 2. Resource Attributes (리소스 속성)
post.authorId
post.organizationId
notice.scope (GLOBAL, ORGANIZATION, PERSONAL)
activity.deadline
schedule.attendanceWindow
// 3. Environment Attributes (환경 속성)
LocalDateTime.now()
request.location
request.ipAddress
// 4. Action Attributes (행위 속성)
READ, CREATE, UPDATE, DELETE
APPROVE, REJECT
SUBMIT, REVIEW| // MemberRole: 시스템 레벨 | ||
| if (principal.getMemberRole() == MemberRole.ADMIN) { | ||
| // 전체 시스템 관리자 | ||
| } | ||
| if(principal.getMemberRole() ==MemberRole.ADMIN){ | ||
| // 전체 시스템 관리자 | ||
| } | ||
|
|
||
| // ChallengerRole: 조직 레벨 | ||
| if (principal.hasRole(RoleType.SCHOOL_PRESIDENT)) { | ||
| // 특정 학교의 회장 (현재 기수) | ||
| } | ||
| if(principal. | ||
|
|
||
| hasRole(RoleType.SCHOOL_PRESIDENT)){ | ||
| // 특정 학교의 회장 (현재 기수) | ||
| } | ||
| ``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
이 예시 코드 블록의 포맷이 깨져 가독성이 떨어집니다. if 문이 여러 줄로 나뉘고, 띄어쓰기가 없어 읽기 어렵습니다. 이전 포맷으로 되돌리거나 아래와 같이 수정하는 것을 제안합니다.
| // MemberRole: 시스템 레벨 | |
| if (principal.getMemberRole() == MemberRole.ADMIN) { | |
| // 전체 시스템 관리자 | |
| } | |
| if(principal.getMemberRole() ==MemberRole.ADMIN){ | |
| // 전체 시스템 관리자 | |
| } | |
| // ChallengerRole: 조직 레벨 | |
| if (principal.hasRole(RoleType.SCHOOL_PRESIDENT)) { | |
| // 특정 학교의 회장 (현재 기수) | |
| } | |
| if(principal. | |
| hasRole(RoleType.SCHOOL_PRESIDENT)){ | |
| // 특정 학교의 회장 (현재 기수) | |
| } | |
| ``` | |
| // MemberRole: 시스템 레벨 | |
| if (principal.getMemberRole() == MemberRole.ADMIN) { | |
| // 전체 시스템 관리자 | |
| } | |
| // ChallengerRole: 조직 레벨 | |
| if (principal.hasRole(RoleType.SCHOOL_PRESIDENT)) { | |
| // 특정 학교의 회장 (현재 기수) | |
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
이 PR은 전체 프로젝트에 대한 코드 포맷팅 작업입니다. IDE의 자동 포맷터를 사용하여 코드 스타일을 일관되게 정리한 것으로 보입니다.
주요 변경사항:
- Import 문 정렬 및 wildcard import 확장
- 불필요한 공백 라인 제거
- JavaDoc 포맷팅 정리
- Spring REST Docs 템플릿 파일 들여쓰기 추가
Reviewed changes
Copilot reviewed 5 out of 8 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
response-fields.snippet |
AsciiDoc 테이블 구문에 일관된 들여쓰기 추가 |
request-fields.snippet |
AsciiDoc 테이블 구문에 일관된 들여쓰기 추가 |
RestDocsConfig.java |
Wildcard import를 명시적 import로 확장하고 순서 정리 |
UmcProductApplicationTests.java |
사용하지 않는 @Test import 제거 |
Public.java |
JavaDoc 설명을 한 줄로 포맷팅 |
PageResponse.java |
Import 순서를 Java 컨벤션에 맞게 정리 (java.* 먼저) |
LoadWorkbookMissionPort.java |
불필요한 공백 라인 제거 |
✅ 체크리스트
🔥 연관 이슈
🚀 작업 내용
💬 리뷰 중점사항
📃 관련 문서
Summary by CodeRabbit
릴리스 노트
Style
Chores
Documentation
✏️ Tip: You can customize this high-level summary in your review settings.