spotless
spotless copied to clipboard
Formatting inconsistent when both <tabs> and <spaces> indentation rules are present
I'm encountering inconsistent formatting behavior when both
Some Java files are formatted, some are skipped, and others show partial formatting. When I remove one of the two [DEBUG] Spotless will not format an up-to-date file:
<plugin>
<groupId>com.diffplug.spotless</groupId>
<artifactId>spotless-maven-plugin</artifactId>
<version>2.43.0</version>
<configuration>
<java>
<includes>
<include>src/main/java/**/*.java</include>
<include>src/test/java/**/*.java</include>
</includes>
<trimTrailingWhitespace/>
<removeUnusedImports/>
<indent>
<tabs>true</tabs>
<spacesPerTab>2</spacesPerTab>
</indent>
<indent>
<spaces>true</spaces>
<spacesPerTab>4</spacesPerTab>
</indent>
<googleJavaFormat>
<version>1.17.0</version>
</googleJavaFormat>
</java>
<pom>
<includes>
<include>pom.xml</include>
</includes>
<sortPom>
<expandEmptyElements>false</expandEmptyElements>
</sortPom>
</pom>
<markdown>
<excludes>
<exclude>**/node/**</exclude>
<exclude>**/node_modules/**</exclude>
</excludes>
<includes>
<include>**/*.md</include>
</includes>
<flexmark/>
</markdown>
</configuration>
<executions>
<execution>
<goals>
<goal>check</goal>
</goals>
<phase>validate</phase>
</execution>
</executions>
</plugin>