-
Notifications
You must be signed in to change notification settings - Fork 15
task: Adding golang precommit hooks #503
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
tools/hooks/golang-precommit.sh
Outdated
| # Return to the original directory | ||
| cd - |
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.
can we use pushd popd here please
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.
No problem! adding.
tools/hooks/golang-precommit.sh
Outdated
|
|
||
| # Run unit tests for Go files | ||
| echo "Running Go unit tests..." | ||
| make unit-test |
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.
Since we have most of this in the cli makefile, can we have here
#!/usr/bin/env bash
pushd tools/cli
make pre-commit
so that we reuse the logic in the makefile in the cli
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.
Awesome! I missed that precommit setup!
andreaangiolillo
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.
LGTM, thanks for all the changes
Proposed changes
Adding specific golang precommit hooks to help with streamlining PR creation.
Changes are only run when go file change is detected in changeset.