Skip to content

Commit

Permalink
Disable Spotless format checking for some generated files. (google#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 and tibor-universe committed Aug 17, 2024
1 parent b762b17 commit d0cea6b
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 @@ -187,11 +187,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 d0cea6b

Please sign in to comment.