As an extra check it would be good to add mvn spotless:apply to pre-commit so that it runs on git commit
Seems both Java and Scala are not listed as supported languages for pre-commit but they do have:
docker
docker_image
script
system
"System hooks provide a way to write hooks for system-level executables which don't have a supported language above (or have special environment requirements that don't allow them to run in isolation such as pylint).
This hook type will not be given a virtual environment to work with – if it needs additional dependencies the consumer must install them manually.
Support: the support of system hooks depend on the executables."
As an extra check it would be good to add
mvn spotless:apply
to pre-commit so that it runs ongit commit
Seems both Java and Scala are not listed as supported languages for pre-commit but they do have:
"System hooks provide a way to write hooks for system-level executables which don't have a supported language above (or have special environment requirements that don't allow them to run in isolation such as pylint).
This hook type will not be given a virtual environment to work with – if it needs additional dependencies the consumer must install them manually.
Support: the support of system hooks depend on the executables."
https://pre-commit.com/#supported-languages
I found some issues about pre-commit and spotless:
https://github.com/diffplug/spotless/issues/623
https://github.com/diffplug/spotless/issues/178