Skip to content

Commit

Permalink
[INFRA] add spotless to project and build check , apache#3846
Browse files Browse the repository at this point in the history
  • Loading branch information
hansva committed Apr 21, 2024
1 parent ad8e151 commit e9f05bf
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/pr_build_code.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,5 +51,7 @@ jobs:
run: mvn clean apache-rat:check
- name: Checkstyle
run: mvn clean checkstyle:check
- name: Spotless check
run: mvn spotless:check
- name: Build with Maven
run: MAVEN_OPTS="-XX:+TieredCompilation -XX:TieredStopAtLevel=1"; mvn clean install -T 1C -B -C -e -fae -V -Dmaven.compiler.fork=true -Dsurefire.rerunFailingTestsCount=2 -Dassemblies=false -Djacoco.skip=true --file pom.xml
25 changes: 25 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -866,6 +866,31 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>com.diffplug.spotless</groupId>
<artifactId>spotless-maven-plugin</artifactId>
<version>2.43.0</version>
<configuration>
<java>
<includes>
<include>src/**/*.java</include>
</includes>
<googleJavaFormat>
</googleJavaFormat>
<importOrder/>
<removeUnusedImports/>
</java>
</configuration>
<executions>
<execution>
<id>spotless-format</id>
<goals>
<goal>apply</goal>
</goals>
<phase>compile</phase>
</execution>
</executions>
</plugin>
</plugins>
</build>

Expand Down

0 comments on commit e9f05bf

Please sign in to comment.