-
Notifications
You must be signed in to change notification settings - Fork 456
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for 'palantir-java-format' #1076
Comments
Tons of interest! The best way is probably to add a If your API is close enough to GoogleJavaFormat's, then another way to do it is to add a configuration option to the existing GoogleJavaFormatStep, but I imagine that even if your API's match today, they might diverge over time, so probably best to stay decoupled. A recent PR which I would consider a canonical example of adding a new formatter is #1011. |
Fantastic, thanks @nedtwigg! I'll put together a PR this evening :-) |
Released in |
palantir-java-format is a modern, lambda-friendly, 120 character Java formatter based on the excellent google-java-format, and benefits from the work of all the original authors. palantir-java-format is available under the same (Apache 2.0 License)[https://github.com/palantir/palantir-java-format/blob/develop/LICENSE].
Examples from the readme
(1) before:
(1) after:
(2) before:
(2) after:
We've leveraged the expanded configuration surface of the Gradle plugin to use a custom spotless format step with Gradle, however it's not quite as easy to wire in using the maven plugin. I'd love to use spotless with the Palantir java formatter in some maven projects, but it's nontrivial to wire together externally. Rather than attempting to rebuild your excellent wheel, I'd like to investigate if there's any interest in accepting it as a third java formatter option out of the box.
Thanks!
The text was updated successfully, but these errors were encountered: