Some custom maven hooks for pre-commit.
A collection of git hooks for Java to be used with the pre-commit framework.
Maven Hooks requires the following to run:
- create
.pre-commit-config.yaml
in you git project - pre-commit install
- enjoy :)
example .pre-commit-config.yaml
:
# ...
- repo: https://github.com/RatanShreshtha/maven-pre-commit-hooks.git
rev: master
hooks:
- id: mvn-compile
- id: mvn-test
- id: mvn-checkstyle
# ...
Hook name | Description |
---|---|
mvn-compile |
Runs the compiler to ensure that there is compilation error. |
mvn-test |
Runs the junits and jacoco to ensure coverage is at least 90%. |
mvn-checkstyle |
Runs the checkstyle static code analysis tool. |