This project is intended to be an example solution of how you can create git hooks within the repository and leverage gradle to ensure that the git hooks are used to promote high code quality.
Git hooks can help with many things. Some common ones are:
- Run code through a formatter (or at least check it against a format)
- Build the code before it committed / pushed (to prevent broken builds!)
- Send alerts / updates about new commits
This project exists as a starting place to help teams leverage the power of git hooks. Sure, you trust your teammates (or yourself, confidence is important!), but everyone makes silly mistakes! Catch them faster and save more time with git hooks!
To use this project, clone or download the source, and use the snippet provided in the build.gradle to start applying git hooks in your repository today
Contributions, whether it is code snippets, additional git hook ideas, comments, questions, etc. are welcomed and encouraged!
- All code contributions must be properly documented with in-line comments. Explain what you have done as if it's brand new to the person you are showing it to.
- Use the included formatter to format all code. This project uses the google-java-format, and provides a gradle plugin to enforce the format. Formatting can be done either from an IDE, the google-java-format jar itself, or via the provided gradle plugin (./gradlew goJF)
This Repository is licensed under the MIT Licencse. See LICENSE for details