Skip to content

Commit

Permalink
use spotless
Browse files Browse the repository at this point in the history
Signed-off-by: tison <[email protected]>
  • Loading branch information
tisonkun committed Mar 19, 2024
1 parent de25575 commit 53b0759
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 15 deletions.
2 changes: 0 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,6 @@ jobs:
distribution: 'zulu'
- name: Check format
run: mvn spotless:check
- name: Check Sort POM
run: mvn sortpom:verify

test_ingester_common:
needs: check
Expand Down
37 changes: 24 additions & 13 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,6 @@
<maven-source-plugin.version>3.0.1</maven-source-plugin.version>
<nexus-staging-maven-plugin.version>1.6.8</nexus-staging-maven-plugin.version>
<palantir-java-format.version>2.41.0</palantir-java-format.version>
<sortpom-maven-plugin.version>3.4.1</sortpom-maven-plugin.version>
<spotless-plugin.version>2.43.0</spotless-plugin.version>
</properties>

Expand Down Expand Up @@ -199,23 +198,27 @@

<build>
<plugins>
<plugin>
<groupId>com.github.ekryd.sortpom</groupId>
<artifactId>sortpom-maven-plugin</artifactId>
<version>${sortpom-maven-plugin.version}</version>
<configuration>
<nrOfIndentSpace>4</nrOfIndentSpace>
<keepBlankLines>true</keepBlankLines>
<expandEmptyElements>false</expandEmptyElements>
<encoding>${project.build.sourceEncoding}</encoding>
<verifyFail>Stop</verifyFail>
</configuration>
</plugin>
<plugin>
<groupId>com.diffplug.spotless</groupId>
<artifactId>spotless-maven-plugin</artifactId>
<version>${spotless-plugin.version}</version>
<configuration>
<formats>
<format>
<includes>
<include>*.md</include>
<include>.gitignore</include>
<include>pom.xml</include>
</includes>
<trimTrailingWhitespace />
<endWithNewline />
<indent>
<spaces>true</spaces>
<spacesPerTab>4</spacesPerTab>
</indent>
</format>
</formats>

<java>
<palantirJavaFormat>
<version>${palantir-java-format.version}</version>
Expand All @@ -233,6 +236,14 @@
</indent>
<toggleOffOn/>
</java>

<pom>
<sortPom>
<expandEmptyElements>false</expandEmptyElements>
<keepBlankLines>true</keepBlankLines>
<nrOfIndentSpace>4</nrOfIndentSpace>
</sortPom>
</pom>
</configuration>
</plugin>

Expand Down

0 comments on commit 53b0759

Please sign in to comment.