Skip to content

Commit

Permalink
Disable Spotless format checking for some generated files. (#2559)
Browse files Browse the repository at this point in the history
Files generated by the protobuf compiler are not going to conform to the
expected format. It's not useful to check them.
  • Loading branch information
eamonnmcmanus authored Nov 28, 2023
1 parent fc748cd commit 9743d42
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -168,11 +168,13 @@
</formats>

<java>
<!-- Exclude classes which need Java 17 for compilation; Google Java Format internally relies on javac,
so formatting will fail if build is executed with JDK 11 -->
<excludes>
<!-- Exclude classes which need Java 17 for compilation; Google Java Format internally relies on javac,
so formatting will fail if build is executed with JDK 11 -->
<exclude>src/test/java/com/google/gson/functional/Java17RecordTest.java</exclude>
<exclude>src/test/java/com/google/gson/native_test/Java17RecordReflectionTest.java</exclude>
<!-- Exclude protobuf generated code. -->
<exclude>target/generated-test-sources/protobuf/**/*.java</exclude>
</excludes>
<googleJavaFormat>
<style>GOOGLE</style>
Expand Down

0 comments on commit 9743d42

Please sign in to comment.