ganga-devs / ganga

Ganga is an easy-to-use frontend for job definition and management
GNU General Public License v3.0
100 stars 159 forks source link

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

Closed samadpls closed 9 months ago

samadpls commented 9 months ago

Issue:

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

Suggested Action:

alexanderrichards commented 9 months ago

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.