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

[v2] Custom pre-commit hook #134

Merged
merged 15 commits into from
Jun 29, 2023
Merged

[v2] Custom pre-commit hook #134

merged 15 commits into from
Jun 29, 2023

Conversation

Alph3ga
Copy link
Contributor

@Alph3ga Alph3ga commented Jun 28, 2023

Added a custom pre-commit hook for linting commits, along with a shell script to install the hook.
Chose to do this over using the pre-commit tool because dependencies and runtime environments for all the hooks needed were externally managed anyway. This way, fewer things to look for if something breaks.

@Alph3ga Alph3ga linked an issue Jun 28, 2023 that may be closed by this pull request
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
Copy link
Member

@proffapt proffapt left a comment

Choose a reason for hiding this comment

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

Yeah, rest of it looks decent enough. It will get the job done.

If you somehow want it to be more robust then add checks whether those commands ran properly or not and print corresponding messages

.githooks/pre-commit Outdated Show resolved Hide resolved
Alph3ga and others added 2 commits June 29, 2023 21:12
change the &> redirection

Co-authored-by: Arpit Bhardwaj <proffapt@pm.me>
Copy link
Member

@proffapt proffapt left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Member

@harshkhandeparkar harshkhandeparkar left a comment

Choose a reason for hiding this comment

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

@proffapt merge if the shell script is fine.

@harshkhandeparkar harshkhandeparkar merged commit 6837137 into v2-dev Jun 29, 2023
@proffapt
Copy link
Member

@proffapt merge if the shell script is fine.

Ahhh, my base standard for shell scripts is a bit high, not fine but will get the job done so fine.. idk

@harshkhandeparkar harshkhandeparkar deleted the v2-precommit-hook branch July 3, 2023 10:46
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.

[v2] Pre-Commit Linter
3 participants