-
Notifications
You must be signed in to change notification settings - Fork 18
chore: automate project standards before push #94
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
Conversation
3021ddb to
daeb67c
Compare
beeme1mr
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is great, thanks!
|
Hey @kriscoleman, please ping me when the merge conflicts and readme changes have been addressed so I can merge the PR. Thanks! |
Sounds great @beeme1mr |
daeb67c to
6e27bbd
Compare
Adds Lefthook configuration to automate Git hooks, ensuring consistent pre-commit & pre-push checks. Lefthook automates pre-commit checks such as code formatting and pre-push checks to ensure documentation and tests are up-to-date. This helps maintain code quality and consistency across the team. I find this saves me time as I switch projects and standards, so I don't push and wait for a PR check to fail. Signed-off-by: Kris Coleman <kriscodeman@gmail.com>
6e27bbd to
c3b2af0
Compare
|
@beeme1mr rebased this and addressed your feedback on docs. I also dropped the fmt commit, because that got merged in the other PR. I reran all hooks and they passed locally and no changes were generated. |
feat: integrates pre-commit and pre-push hooks to automate standards Adds Lefthook configuration to automate Git hooks, ensuring consistent pre-commit & pre-push checks. Lefthook automates pre-commit checks such as code formatting and pre-push checks to ensure documentation and tests are up-to-date. This helps maintain code quality and consistency across the team. I find this saves me time as I switch projects and standards, so I don't push and wait for a PR check to fail. Signed-off-by: Kris Coleman <kriscodeman@gmail.com> Signed-off-by: Adityasinghvats <131326798+Adityasinghvats@users.noreply.github.com>
feat: integrates pre-commit and pre-push hooks to automate standards Adds Lefthook configuration to automate Git hooks, ensuring consistent pre-commit & pre-push checks. Lefthook automates pre-commit checks such as code formatting and pre-push checks to ensure documentation and tests are up-to-date. This helps maintain code quality and consistency across the team. I find this saves me time as I switch projects and standards, so I don't push and wait for a PR check to fail. Signed-off-by: Kris Coleman <kriscodeman@gmail.com> Signed-off-by: Adityasinghvats <131326798+Adityasinghvats@users.noreply.github.com>
This PR
go fmtas a pre-commit hook withstage_fixed: true(it will automatically stage the fixes), preventing pushes with bad code formatting.make generate-docsis executed pre-push, preventing a push with forgotten document generation updatesgo testis executed and tests pass pre-push, preventing a push with broken testsREADME.mdto reflect the latest Lefthook setup and usage instructions.Notes
lefthook run pre-commitorlefthook run pre-push.Follow-up Tasks
go vet.How to test
brew install lefthook.lefthook installto opt-in and set up the hooks.go fmtruns and stages any changes automatically.