Discuss use of git hooks
Is this related to #549 in context of a "dev init"?
Do not let quality checks be a speed barrier for red-green-refactor. Make them a barrier to pushing problems to others. Discuss breaking up the build to hasten cycle time.
- Diagram for steps in a build, local and CI.
- Leverage git hooks (local or in CI) to stop problems from spreading.
- Find usable red-green-refactor cycle image for this section.
- Include discussion of Gradle and Maven plugins to auto-create hooks for you.
Update this page: https://github.com/binkley/modern-java-practices/wiki/Cycle-time and integrate with other pages. Is this a good place for this reference? http://www.extremeprogramming.org/ <-- May be better in introduction? In a "Why this book" section?
ref:
- https://git-scm.com/book/en/v2/Customizing-Git-Git-Hooks
- [GitLab] https://docs.gitlab.com/ee/administration/server_hooks.html
@jwlibby Talk about what moves to CI.
The book should offer options and let the team pick. Discuss tradeoffs on speed for red-green-refactor vs local quality. Key is that all these issues are fixed before push to share with others.
Examples:
- Checkstyle on pre-push, not on commit
- Mutation testing (PIT) on pre-push, not on commit
- How to automatically fix style issues in Java? (Kotlin ktlint does this)
- Call out IDE settings