apache / sedona

A cluster computing framework for processing large-scale geospatial data
https://sedona.apache.org/
Apache License 2.0
1.96k stars 692 forks source link

Run `mvn spotless:apply` with `pre-commit` so that it runs on `git commit` #1643

Open jbampton opened 1 month ago

jbampton commented 1 month ago

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:

"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

github-actions[bot] commented 1 month ago

Thank you for your interest in Apache Sedona! We appreciate you opening your first issue. Contributions like yours help make Apache Sedona better.