chore: automate project standards before push#94
Merged
beeme1mr merged 1 commit intoopen-feature:mainfrom Apr 14, 2025
Merged
Conversation
3021ddb to
daeb67c
Compare
beeme1mr
reviewed
Apr 7, 2025
Member
|
Hey @kriscoleman, please ping me when the merge conflicts and readme changes have been addressed so I can merge the PR. Thanks! |
Collaborator
Author
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
Collaborator
Author
|
@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. |
Adityasinghvats
pushed a commit
to Adityasinghvats/cli
that referenced
this pull request
May 28, 2025
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>
Adityasinghvats
pushed a commit
to Adityasinghvats/cli
that referenced
this pull request
May 28, 2025
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 was referenced Feb 6, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.