Repository navigation
chore(spanner-jdbc): format non-complying files with fmt-maven-plugin - #15327
Conversation
There was a problem hiding this comment.
Code Review
This pull request primarily applies code formatting and line-wrapping adjustments to long string literals across various Java source and test files in the "java-spanner-jdbc" module. The reviewer correctly points out that "SingerProto.java" is an auto-generated file and should not be reformatted, as future code generation will overwrite these changes.
| "\n" | ||
| + "\014singer.proto\022\026examples.spanner.music\"\301\001\n\n" | ||
| + "SingerInfo\022\026\n" | ||
| + "\tsinger_id\030\001 \001(\003H\000\210\001\001\022\027\n" | ||
| + "\n" | ||
| + "birth_date\030\002 \001(\tH\001\210\001\001\022\030\n" | ||
| + "\013nationality\030\003 \001(\tH\002\210\001\001\0221\n" | ||
| + "\005genre\030\004" | ||
| + " \001(\0162\035.examples.spanner.music.GenreH\003\210\001\001B\014\n\n" | ||
| + "_singer_idB\r\n" | ||
| + "\013_birth_dateB\016\n" | ||
| + "\014_nationalityB\010\n" | ||
| + "\006_genre*.\n" | ||
| + "\005Genre\022\007\n" | ||
| + "\003POP\020\000\022\010\n" | ||
| + "\004JAZZ\020\001\022\010\n" | ||
| + "\004FOLK\020\002\022\010\n" | ||
| + "\004ROCK\020\003B)\n" | ||
| + "\030com.google.cloud.spannerB\013SingerProtoP\000b\006proto3" |
There was a problem hiding this comment.
Reformatting generated files like SingerProto.java (which is generated by the Protocol Buffer compiler protoc) should be avoided. Any future regeneration of this file will overwrite these formatting changes, leading to unnecessary diffs or build failures in CI if formatting checks are enforced. It is recommended to revert the changes to this file and exclude generated files from the fmt-maven-plugin configuration.
References
- Do not suggest manual changes or style improvements to auto-generated files, as these changes will be overwritten during the next code generation.
Summary
Formats 21 pre-existing non-complying file(s) in
java-spanner-jdbcusingcom.spotify.fmt:fmt-maven-plugin:2.29(<skipReflowingLongStrings>false</skipReflowingLongStrings>), following #15028 (similar to #15300, #15302, #15316, #15322). Formatting-only change with no behavioral impact.Verification
mvn -B -ntp -T 1C -pl java-spanner-jdbc -Dlint com.spotify.fmt:fmt-maven-plugin:check checkstyle:check@checkstyle(withgoogle-cloud-shared-configfrommaininstalled locally):0non-complying files and0Checkstyle violations.Context: b/581031020