-
-
Notifications
You must be signed in to change notification settings - Fork 347
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
Support Palantir-Java-Format for Java (500USD Bounty) #3448
Comments
I'd prefer |
Sure! Maybe it should be via |
Let's go with palantir-java-format for now. At a glance Spotless seems a lot more heavyweight, and maybe can come in a follow up, but palantir-java-format should suit the immediate need of "we need a java formatter" and hopefully be easier to implement |
I experiemented with it in the past but got some class access issues due to not using the module classloader. So, if you're a Scala dev not so deep into Java, expect some difficulties. |
yeah I assume there'll be stumbling blocks but I assume they'll be work-around-able. If it can work in eclipse/intellij/gradle/spotless it should be doable inside Mill; worst come to worst we can run it in a separate subprocess. But that's for whoever picks up the bounty to figure out! |
Added `contrib.palantir.JavafmtModule` for formatting Java sources using [Palantir](https://github.com/palantir/palantir-java-format/). The plugin also supports command line arguments for - checking for formatting errors with `--check` flag - formatting specific files or folders Resolves #3448.
From the maintainer Li Haoyi: I'm putting a 500USD bounty on this issue, payable by bank transfer on a merged PR implementing this.
Palantir-Java-Format is a common Java autoformatter, and we should support it as a
contrib/
module to better support Java projects. We should support all common configuration options to allow usage onJavaModule
s andScalaModule
s (which can contain Java sources). It should broadly work the same way ScalaFmt works for Scala (https://mill-build.org/mill/0.11.12/Scala_Module_Config.html#_reformatting_your_code) This needs to come with a reasonable set of unit tests, docs, and at least one example test that can be included in the documentation.May be able to adapt something from https://github.com/sbt/sbt-java-formatter
The text was updated successfully, but these errors were encountered: