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

[FEATURE] Use git hooks to auto apply or check for common issues before commit or push #2175

Open
M-Faheem-Khan opened this issue Feb 12, 2024 · 1 comment
Labels
feature New feature or request

Comments

@M-Faheem-Khan
Copy link
Contributor

Describe the feature

We can utilize git hooks to improve developer experience. Git hooks are scripts that are run at various event in git such as commit & push. We make use of these hooks to automate certain tasks or add checks. We can add auto format before commit, check to make sure our commit message are following guidelines outlined by common conventions, run errorprone or add a security scan. These are few of the many many ways we can use git hooks to our advantage.

Adding git hooks can maintainers not get overwhelmed with notification or failed pipelines and save on cost by not having to rerun runner with each new commit(eco friendly ♻️).

Motivation

Formatting is annoying, running errorprone as part of pre-push can help us reduce new issues introduced.

Describe the solution

We can use either a tool like precommit or simply add our hooks in .git/hooks/<hook>. How?

Additional context

No response

@M-Faheem-Khan M-Faheem-Khan added the feature New feature or request label Feb 12, 2024
@justinmclean
Copy link
Member

It's a good idea, but it comes with a cost. We are looking into using error-prone - see #1746, and in the last week, I've raised a number of issues related to error problem warnings. We also want to donate the project to the ASF Incubator in the near future, and the ASF has some restrictions on what we can and can not run as we would be using a shared resource from all ASF projects, and we need to ensure we don't take more than our fair share of resources.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants