Liam Miller-Cushon
Liam Miller-Cushon
`Main.formatFiles` is only intended to be used by the CLI. If you want to use the formatter as a library and invoke it programmatically, I recommend [`com.google.googlejavaformat.java`](https://github.com/google/google-java-format/blob/6f86d4fbb0d0bc3fd471e0f0d4f0ca207c7b651b/core/src/main/java/com/google/googlejavaformat/java/Formatter.java#L88).
There's some related discussion in #145, this code really isn't intended to be used as a library, in part because it makes decisions about e.g. threading and error handling that...
For posterity: ``` google-java-format T.java T.java:error: Imports not contiguous (perhaps a comment separates them?) ``` i.e. https://github.com/google/google-java-format/blob/64242e17f5478eb07a2ca7e409382271765f2524/core/src/main/java/com/google/googlejavaformat/java/ImportOrderer.java#L81
https://github.com/google/google-java-format/issues/787
If nothing else the formatter should be reported a better diagnostic here, but there's a zero-width space in that example `getAndIncrement("foo")`, which is [disallowed by the style guide](https://google.github.io/styleguide/javaguide.html#s2.3.1-whitespace-characters). Removing that...
See also [this FAQ entry](https://github.com/google/google-java-format/wiki/FAQ#i-just-need-to-configure-it-a-bit-differently-how).
The documentation mentions that the goal of the tool is to reformat Java source code to comply with Google Java Style (and AOSP style). The decision about the column limit...
Can you share any self-contained examples that demonstrate the problems you're seeing with javadoc formatting, and with `--skip-javadoc-formatting`?
> The more important use case for separate version arguments is the possibility of independent releases for the Eclipse plugin (e.g. bugfix releases) Thanks, that makes sense. The main disadvantage...
cc @plumpy @Alos, the stack trace doesn't mention google-java-format, are you sure it's related to the plugin? Do you have a repro?