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] Enhance Workflow with Pre-commit Hook #2287

Closed
samadpls opened this issue Feb 14, 2024 · 1 comment
Closed

[Feature] Enhance Workflow with Pre-commit Hook #2287

samadpls opened this issue Feb 14, 2024 · 1 comment

Comments

@samadpls
Copy link
Contributor

Issue:

Propose adding a pre-commit hook to prevent formatting issues in new commits, complementing the autopep8 PR ( #2254 )

Suggested Action:

  • Add a pre-commit hook for local checks and auto-formatting before commits.
@alexanderrichards
Copy link
Contributor

alexanderrichards commented Feb 14, 2024

speaking personally, I dislike having things change my commit in pre-commit hooks as I like to know exactly what I'm committing. This issue I think is already well mitigated by having checks run GitHub side after a commit to point out violations combined with a linter which the IDE (VSCode in my case) runs in real time to stop you making the violations in the first place. In my opinion this is a more desirable approach as I know exactly what I've committed.

You'll note that even the autopep8 PR action doesn't modify the branch in place but rather creates a separate branch and PR for review.

@egede egede closed this as completed Feb 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants