Skip to content

Commit

Permalink
Configure Spotless to format sources
Browse files Browse the repository at this point in the history
https://github.com/diffplug/spotless/tree/main/plugin-maven

To format sources:

    ./mvnw spotless:apply

The verify phase run the spotless:check goal to ensure sources are correctly formatted.
  • Loading branch information
jcgay committed Nov 22, 2022
1 parent 5bf7b57 commit 8b01ff3
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,35 @@
<autoReleaseAfterClose>true</autoReleaseAfterClose>
</configuration>
</plugin>
<plugin>
<groupId>com.diffplug.spotless</groupId>
<artifactId>spotless-maven-plugin</artifactId>
<version>2.27.2</version>
<configuration>
<java>
<importOrder />
<removeUnusedImports />
<palantirJavaFormat />
<formatAnnotations />
</java>
<pom>
<sortPom />
</pom>
<markdown>
<includes>
<include>**/*.md</include>
</includes>
<flexmark/>
</markdown>
</configuration>
<executions>
<execution>
<goals>
<goal>check</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>

Expand Down

0 comments on commit 8b01ff3

Please sign in to comment.