Some out-of-the-box hooks for pre-commit.
See also: https://github.com/pre-commit/pre-commit
Add this to your .pre-commit-config.yaml
repos:
- repo: https://github.com/ejba/pre-commit-maven
rev: v0.2.0
hooks:
- id: maven
args: ['clean compile']
- id: maven-spotless-apply
# - id: ...
Runs arbitrary maven commands. args: ['clean compile verify']
.
Runs compile build lifecycle.
Runs test build lifecycle.
Runs checkstyle:check.
Runs spotless:check.
Runs spotless:apply.