Skip to content

Commit

Permalink
Enable Spotless for automatic formatting (#421)
Browse files Browse the repository at this point in the history
  • Loading branch information
basil committed Apr 19, 2023
1 parent 2592fcc commit bb1a9b4
Showing 1 changed file with 40 additions and 0 deletions.
40 changes: 40 additions & 0 deletions pom.xml
Expand Up @@ -78,6 +78,9 @@
-->
<spotbugs.omitVisitors>FindReturnRef</spotbugs.omitVisitors>

<!-- Set to false to enable Spotless -->
<spotless.check.skip>true</spotless.check.skip>

<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<project.build.outputEncoding>UTF-8</project.build.outputEncoding>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
Expand Down Expand Up @@ -119,6 +122,7 @@
<mockito.version>5.3.0</mockito.version>
<spotbugs-annotations.version>4.7.3</spotbugs-annotations.version>
<spotbugs-maven-plugin.version>4.7.3.4</spotbugs-maven-plugin.version>
<spotless-maven-plugin.version>2.36.0</spotless-maven-plugin.version>
<stapler-plugin.version>1.23</stapler-plugin.version>
</properties>

Expand Down Expand Up @@ -195,6 +199,11 @@
<artifactId>maven-license-plugin</artifactId>
<version>${maven-license-plugin.version}</version>
</plugin>
<plugin>
<groupId>com.diffplug.spotless</groupId>
<artifactId>spotless-maven-plugin</artifactId>
<version>${spotless-maven-plugin.version}</version>
</plugin>
<plugin>
<groupId>com.github.spotbugs</groupId>
<artifactId>spotbugs-maven-plugin</artifactId>
Expand Down Expand Up @@ -602,6 +611,37 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>com.diffplug.spotless</groupId>
<artifactId>spotless-maven-plugin</artifactId>
<configuration>
<java>
<endWithNewline />
<importOrder />
<indent>
<spaces>true</spaces>
</indent>
<palantirJavaFormat />
<removeUnusedImports />
<trimTrailingWhitespace />
</java>
<pom>
<sortPom>
<expandEmptyElements>false</expandEmptyElements>
<sortDependencies>scope,groupId,artifactId</sortDependencies>
<sortDependencyExclusions>groupId,artifactId</sortDependencyExclusions>
<spaceBeforeCloseEmptyElement>true</spaceBeforeCloseEmptyElement>
</sortPom>
</pom>
</configuration>
<executions>
<execution>
<goals>
<goal>check</goal>
</goals>
</execution>
</executions>
</plugin>

<plugin>
<artifactId>maven-enforcer-plugin</artifactId>
Expand Down

0 comments on commit bb1a9b4

Please sign in to comment.