language-formatters-pre-commit-hooks icon indicating copy to clipboard operation
language-formatters-pre-commit-hooks copied to clipboard

Support native google-java-format executables

Open vorburger opened this issue 1 year ago • 3 comments
trafficstars

In https://github.com/google/google-java-format/issues/868#issuecomment-1951339602 (via https://github.com/google/google-java-format/pull/1045, et al), we have made "native" (non java -jar google-java-format*.jar) binaries available; the first release to include that was https://github.com/google/google-java-format/releases/tag/v1.20.0.

E.g. https://github.com/JoseVSeb/google-java-format-for-vs-code/issues/17 adopted this in a VSC extension.

This can make checks a) run a bit faster, and b) avoiding requiring having a java on the PATH, which makes this hook easier to run in certain cases (example).

Would you consider adding support for this in this project?

vorburger avatar Mar 01 '24 01:03 vorburger

I would be considering the option of not running the tool via java -jar prelude for versions of the tool that suport that. We do need to make sure that this would work across OSes as well.

I'm open to contributors helping to improve the project. Feel free to open a PR for it and I'll be prioritising reviewing and releasing it.

macisamuele avatar Mar 17 '24 12:03 macisamuele