-
Notifications
You must be signed in to change notification settings - Fork 487
Description
Spotless maven plugin, does not format the import section correctly: it adds an empty line.
- [ 2.11.1] gradle or maven version
- [mac os ] operating system and version
I have created a github repo that is formatted with the google 1.10.0 formatter to reproduce/show the issue.
This is the command line I used to format the code in the repo. (which has nothing to do with spotless)
java --add-exports jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED --add-exports jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED --add-exports jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED --add-exports jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED --add-exports jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED -jar /PATH_TO_YOUR_GOOGLE_JAR/google-java-format-1.10.0-all-deps.jar -r
$(git ls-files|grep .java$ )
this is the url of my repo: (and the code is formatted by the google-java-format-1.10.0-all-deps.jar)
https://github.com/clembo590/issue_spotless.git
if you git clone the repo and then run
mvn com.diffplug.spotless:spotless-maven-plugin:2.11.1:apply
An additional line is added at the top of the file.
Is this a bug ? is there any configuration of the plugin that will produce the exact same result as the real google-java-format-1.10.0-all-deps.jar ?


