Skip to content

10 feature husky#12

Merged
meteorqz6 merged 3 commits intomainfrom
10-feature-husky
Jun 10, 2025
Merged

10 feature husky#12
meteorqz6 merged 3 commits intomainfrom
10-feature-husky

Conversation

@meteorqz6
Copy link
Contributor

@meteorqz6 meteorqz6 commented Jun 4, 2025

close #10

commit-msg : commitlint 기반으로 설정
pre-push : 3개의 명령어 중 어떤 명령어에서든 실패하면 push가 즉시 중단된다

@coderabbitai
Copy link

coderabbitai bot commented Jun 4, 2025

Walkthrough

이번 변경에서는 커밋 메시지 린트와 Git 훅을 통한 코드 품질 관리 도구가 도입되었습니다. CodeRabbit AI 리뷰 설정 파일도 추가되어 자동 리뷰 및 요약 기능이 활성화됩니다. 관련 패키지와 설정 파일이 새로 생성되고, 기존 lint 스크립트에 사소한 수정이 이루어졌습니다.

Changes

파일/경로 변경 요약
.coderabbit.yaml CodeRabbit AI 리뷰 및 자동화 설정 파일 신규 추가
.husky/commit-msg, .husky/pre-push 커밋 메시지 린트 및 pre-push 시 코드 검사 수행 훅 스크립트 추가
commitlint.config.js 커밋 메시지 린트 규칙 설정 파일 신규 추가
package.json Husky, commitlint 관련 패키지 및 prepare 스크립트 추가, lint 스크립트 사소 수정

Poem

🐰
커밋마다 린트가 춤추고,
푸시할 때 검사가 빛나네.
토끼는 깡총, 코드를 지켜,
자동 리뷰로 실수는 줄고,
새 규칙 아래 더 단단해진 우리 팀!

(코드는 깔끔, 토끼는 행복!)

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

npm error Exit handler never called!
npm error This is an error with npm itself. Please report this error at:
npm error https://github.com/npm/cli/issues
npm error A complete log of this run can be found in: /.npm/_logs/2025-06-04T02_17_50_777Z-debug-0.log

✨ Finishing Touches
  • 📝 Generate Docstrings

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 4

🧹 Nitpick comments (1)
.coderabbit.yaml (1)

16-16: 파일 끝 개행 누락
YAML 파일 끝에 새 줄이 필요합니다.

🧰 Tools
🪛 YAMLlint (1.37.1)

[error] 16-16: no new line character at the end of file

(new-line-at-end-of-file)

📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 7991133 and 0bdd374.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (5)
  • .coderabbit.yaml (1 hunks)
  • .husky/commit-msg (1 hunks)
  • .husky/pre-push (1 hunks)
  • commitlint.config.js (1 hunks)
  • package.json (2 hunks)
🧰 Additional context used
🪛 YAMLlint (1.37.1)
.coderabbit.yaml

[error] 16-16: no new line character at the end of file

(new-line-at-end-of-file)

🔇 Additional comments (5)
.coderabbit.yaml (2)

1-2: 설정 파일 헤더 및 언어 설정 확인됨
스키마 참조 주석과 language: "ko-KR" 값이 올바르게 지정되어 있습니다.


4-14: 리뷰 설정 확인됨
early_access, reviews.profile 등 리뷰 관련 설정이 의도대로 반영되었습니다.

commitlint.config.js (1)

1-4: commitlint 설정 파일 확인 완료
@commitlint/config-conventional 프리셋을 확장한 구성이 적절합니다.

package.json (2)

26-27: commitlint devDependencies 추가 확인
@commitlint/cli@commitlint/config-conventional이 올바르게 추가되었습니다.


33-33: husky devDependency 추가 확인
Husky 버전 9.x가 devDependencies에 잘 등록되었습니다.

@@ -0,0 +1,16 @@
# yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json
language: "ko-KR"
ignored_branch: ""
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue

알 수 없는 설정 키 ("ignored_branch")
스키마 정의에 ignored_branch 필드는 없습니다. 이 설정이 유효한지 확인 후 불필요하면 제거하거나 올바른 위치로 옮겨주세요.

🤖 Prompt for AI Agents
In the .coderabbit.yaml file at line 3, the key "ignored_branch" is not
recognized in the schema. Verify if this setting is necessary; if it is not
valid or used, remove the "ignored_branch" line entirely. If it is required,
relocate it to the correct section according to the schema documentation.

@@ -0,0 +1 @@
npx commitlint --edit "$1" No newline at end of file
Copy link

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

Husky 훅 스크립트에 쉐뱅 추가 권장
Git hook 스크립트는 쉘 환경을 명시하기 위해 #!/usr/bin/env bash 를 최상단에 추가하는 것이 좋습니다.

+#!/usr/bin/env bash
 npx commitlint --edit "$1"
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
npx commitlint --edit "$1"
#!/usr/bin/env bash
npx commitlint --edit "$1"
🤖 Prompt for AI Agents
In .husky/commit-msg at line 1, the script lacks a shebang line specifying the
shell environment. Add `#!/usr/bin/env bash` as the very first line of the file
to explicitly define the shell interpreter for the Git hook script.

Comment on lines +1 to +4
set -e
npx expo-doctor
npm run lint
npx tsc --noEmit
Copy link

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

Husky pre-push 스크립트에 쉐뱅 추가 권장
Git hook 스크립트는 쉘 환경을 명시하기 위해 #!/usr/bin/env bash 를 최상단에 추가하는 것이 좋습니다.

+#!/usr/bin/env bash
 set -e
 npx expo-doctor
 npm run lint
 npx tsc --noEmit
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
set -e
npx expo-doctor
npm run lint
npx tsc --noEmit
#!/usr/bin/env bash
set -e
npx expo-doctor
npm run lint
npx tsc --noEmit
🤖 Prompt for AI Agents
In the .husky/pre-push file at lines 1 to 4, the script lacks a shebang line
specifying the shell environment. Add the line #!/usr/bin/env bash at the very
top of the file to explicitly define the script interpreter as bash.

Comment on lines +10 to +11
"lint": "eslint .",
"prepare": "husky"
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue

prepare 스크립트 수정 필요
현재 "prepare": "husky" 명령어는 hooks 설치를 수행하지 않습니다. husky install로 변경해주세요.

-    "prepare": "husky"
+    "prepare": "husky install"
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
"lint": "eslint .",
"prepare": "husky"
"lint": "eslint .",
"prepare": "husky install"
🤖 Prompt for AI Agents
In package.json at lines 10 to 11, the "prepare" script currently uses "husky"
which does not install hooks. Change the "prepare" script command to "husky
install" to ensure that husky hooks are properly installed during preparation.

@meteorqz6 meteorqz6 merged commit 518c87c into main Jun 10, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

⚙️ [기능추가]Husky

1 participant