Skip to content

fix: 백준 아이디가 initial인 경우 제외 처리#41

Merged
tkv00 merged 3 commits intodevelopfrom
fix/#40
Dec 16, 2025
Merged

fix: 백준 아이디가 initial인 경우 제외 처리#41
tkv00 merged 3 commits intodevelopfrom
fix/#40

Conversation

@tkv00
Copy link
Contributor

@tkv00 tkv00 commented Dec 16, 2025

🍀 이슈 번호


✅ 작업 사항

  • 전체 유저를 조회하는 쿼리에서 WHERE 절을 추가하여 baekjoon 아이디가 initial인 경우는 제외하도록 했습니다.

⌨ 기타

@tkv00 tkv00 added the 🐛 fix 기능에 대한 버그 수정 label Dec 16, 2025
@tkv00 tkv00 linked an issue Dec 16, 2025 that may be closed by this pull request
1 task
@gemini-code-assist
Copy link

Summary of Changes

Hello @tkv00, 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는 백준 아이디가 'initial'로 설정된 사용자를 전체 사용자 조회 쿼리에서 제외하여 데이터의 정확성을 높이고 불필요한 처리를 방지하는 것을 목표로 합니다. 이는 시스템이 유효한 사용자 데이터만을 기반으로 작동하도록 보장하여 잠재적인 오류를 줄이고 성능을 최적화하는 데 기여합니다.

Highlights

  • 백준 아이디 필터링: 전체 사용자 조회 쿼리에 WHERE baekjoon_id != 'initial' 조건을 추가하여 'initial' 값을 가진 백준 아이디를 가진 사용자를 결과에서 제외합니다.
  • 로그 파일 제거: 불필요한 logs/batch.log 파일이 저장소에서 제거되었습니다.
Using Gemini Code Assist

The 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 /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

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 .gemini/ folder in the base of the repository. Detailed instructions can be found here.

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

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

이번 PR은 백준 ID가 'initial'인 사용자를 조회에서 제외하도록 수정하는 내용이네요. WHERE 절을 추가하여 의도한 기능은 잘 구현되었습니다. 다만, 변경된 로직에 대한 테스트 케이스가 누락되었고, 쿼리 내에 '매직 스트링'이 사용된 점이 아쉬워 리뷰 코멘트를 남겼습니다. 해당 부분을 보완하면 더 안정적이고 유지보수하기 좋은 코드가 될 것 같습니다.

Comment on lines 34 to 35
WHERE
baekjoon_id != 'initial'

Choose a reason for hiding this comment

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

high

WHERE 절을 추가하여 initial ID를 가진 사용자를 제외하는 로직은 올바르게 구현되었습니다. 하지만 몇 가지 개선점이 있습니다.

  1. 테스트 부재: 변경된 로직을 검증하는 테스트 코드가 UserJdbcRepositoryTest.java에 추가되지 않았습니다. baekjoon_id가 'initial'인 테스트용 사용자를 추가하고, findAllUserInfo 호출 시 해당 사용자가 제외되는지 확인하는 테스트 케이스를 추가하는 것이 좋습니다. 테스트 커버리지를 유지하는 것은 코드의 안정성에 매우 중요합니다.

  2. 매직 스트링: 쿼리 내에 'initial'이라는 문자열이 하드코딩되어 있습니다. 이런 값은 "매직 스트링"이라고 불리며, 가독성을 해치고 유지보수를 어렵게 만듭니다. 이 값을 상수로 정의하여 사용하는 것을 권장합니다. 예를 들어, 클래스 상단에 private static final String INITIAL_BAEKJOON_ID = "initial"; 와 같이 선언하고 쿼리에서 참조할 수 있습니다.

@sonarqubecloud
Copy link

@tkv00 tkv00 merged commit 8507830 into develop Dec 16, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🐛 fix 기능에 대한 버그 수정

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix: 백준 아이디가 없는 경우 로직 추가

1 participant