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.3.3
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.