Repository navigation
Closed
Description
- Summary of problem: As the title
- Maven version: 3.8
- Spotless version: 2.43.0
- Operating system and version: windows 11
<plugin>
<groupId>com.diffplug.spotless</groupId>
<artifactId>spotless-maven-plugin</artifactId>
<version>2.43.0</version>
<configuration>
<!-- define a language-specific format -->
<java>
<!-- no need to specify files, inferred automatically, but you can if you want -->
<!-- apply a specific flavor of google-java-format and reflow long strings -->
<!-- <googleJavaFormat>-->
<!-- <version>1.20.0</version>-->
<!-- <style>GOOGLE</style>-->
<!-- <reflowLongStrings>true</reflowLongStrings>-->
<!-- <formatJavadoc>false</formatJavadoc>-->
<!-- </googleJavaFormat>-->
<palantirJavaFormat>
<version>2.39.0</version> <!-- optional -->
<style>PALANTIR</style> <!-- or AOSP/GOOGLE (optional) -->
<formatJavadoc>false</formatJavadoc> <!-- defaults to false (optional, requires at least Palantir 2.39.0) -->
</palantirJavaFormat>
<indent>
<spaces>true</spaces>
<spacesPerTab>2</spacesPerTab>
</indent>
<importOrder/>
<removeUnusedImports/>
<formatAnnotations/>
</java>
<formats>
<!-- you can define as many formats as you want, each is independent -->
<format>
<!-- define the files to apply to -->
<includes>
<include>src/main/java/**/*.java</include>
<include>src/test/java/**/*.java</include>
</includes>
<!-- define the steps to apply to those files -->
<trimTrailingWhitespace/>
<endWithNewline/>
<indent>
<spaces>true</spaces>
<spacesPerTab>2</spacesPerTab>
</indent>
</format>
</formats>
</configuration>
</plugin>
Metadata
Metadata
Assignees
Labels
No labels
Activity
[-]indent does not work with palantirJavaFormat[/-][+]indent is ignored with palantirJavaFormat[/+][-]indent is ignored with palantirJavaFormat[/-][+]indent is ignored by palantirJavaFormat[/+]PaulNgo-BlueOC commentedon Jul 29, 2024
@nedtwigg
nedtwigg commentedon Aug 12, 2024
I'm guessing that
palantiris formatting these as "4 spaces"? The fix is:Dupe of #794
PaulNgo-BlueOC commentedon Aug 12, 2024
Could you help to point out the exact config that i need to put to my pom.xml?
nedtwigg commentedon Aug 12, 2024
It's not polite to
@a bunch of people, if they want to be involved then they'll subscribe to the issue.Try this: