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

Add Pre-Commit Hooks for Code Linting and Formatting #220

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

JaeHyuckSa
Copy link

@JaeHyuckSa JaeHyuckSa commented Aug 12, 2024

Description

This PR adds pre-commit hooks to automatically run code linting and formatting tools before any commit.

Scenario

1. Install Dependencies from requirements-dev.txt

pip install -r requirements-dev.txt

2. Install the Pre-Commit Hooks

pre-commit install

3. Test the Pre-Commit Hooks

echo "print('Hello, world!')" > test_file.py
git add test_file.py
git commit -m "Test pre-commit hooks"

If the hooks are set up correctly, pre-commit will run the specified checks and formatting on test_file.py before the commit is finalized.

4. Apply Hooks to Existing Codebase

To ensure the entire codebase complies with the pre-commit hooks, run

pre-commit run --all-files

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Documentation update
  • Refactoring, Maintenance
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

@JaeHyuckSa JaeHyuckSa changed the title Add Pre-Commit Hooks for Code Linting and Formatting #219 Add Pre-Commit Hooks for Code Linting and Formatting Aug 13, 2024
@soimkim soimkim linked an issue Aug 14, 2024 that may be closed by this pull request
@soimkim soimkim added the chore [PR/Issue] Refactoring, maintenance the code label Aug 14, 2024
@soimkim
Copy link
Contributor

soimkim commented Aug 14, 2024

@saJaeHyukc , 사용 시나리오 Description에 추가 부탁드립니다.

@JaeHyuckSa
Copy link
Author

JaeHyuckSa commented Aug 14, 2024

@saJaeHyukc , 사용 시나리오 Description에 추가 부탁드립니다.

@soimkim 해당 부분 추가했습니다 이 부분 적용할 경우 contribute 문서도 수정하도록 하겠습니다.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chore [PR/Issue] Refactoring, maintenance the code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add Pre-Commit Hooks for Code Linting and Formatting
2 participants