We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
When formatting unused imports in Java code with spotless plugin for maven, the imports are removed, but unnecessary lines remain.
Apache Maven 3.6.0 spotless version 1.23
For instance using spotless:apply to the following code
package foo; import unused public class Foo{ }
will produce
package foo; public class Foo{ }
Includeing two linebreaks. This causes spotless:check to fail.
The text was updated successfully, but these errors were encountered:
Can you copy-paste your spotless configuration block?
Sorry, something went wrong.
Sure, sorry for the delay:
<plugin> <!-- checks code format --> <groupId>com.diffplug.spotless</groupId> <artifactId>spotless-maven-plugin</artifactId> <version>${spotless.version}</version> <executions> <execution> <phase>verify</phase> <goals> <goal>check</goal> </goals> </execution> </executions> <configuration> <java> <googleJavaFormat> <version>${google-java-format.version}</version> <style>GOOGLE</style> </googleJavaFormat> <removeUnusedImports /> </java> </configuration> </plugin>
As of maven-plugin 1.31.0, paddedcell is always enabled, which would fix this problem. Fixed by #565
maven-plugin 1.31.0
No branches or pull requests
When formatting unused imports in Java code with spotless plugin for maven, the imports are removed, but unnecessary lines remain.
Apache Maven 3.6.0
spotless version 1.23
For instance using spotless:apply to the following code
will produce
Includeing two linebreaks. This causes spotless:check to fail.
The text was updated successfully, but these errors were encountered: