Skip to content

chore(spanner-jdbc): format non-complying files with fmt-maven-plugin - #15327

Merged
zhumin8 merged 1 commit into
mainfrom
chore-fmt-spanner-jdbc
Dec 2, 2026
Merged

zhumin8 merged 1 commit into
mainfrom
chore-fmt-spanner-jdbc

Conversation

@zhumin8

@zhumin8 zhumin8 commented Dec 1, 2026

Copy link
Copy Markdown
Contributor

Summary

Formats 21 pre-existing non-complying file(s) in java-spanner-jdbc using com.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 (with google-cloud-shared-config from main installed locally): 0 non-complying files and 0 Checkstyle violations.

Context: b/581031020

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment on lines +1214 to +1232
"\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"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

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
  1. Do not suggest manual changes or style improvements to auto-generated files, as these changes will be overwritten during the next code generation.

@zhumin8
zhumin8 marked this pull request as ready for review December 1, 2026 19:43
@zhumin8
zhumin8 requested review from a team as code owners December 1, 2026 19:43
@zhumin8
zhumin8 requested review from jinseopkim0 and lqiu96 December 1, 2026 19:43
@zhumin8
zhumin8 enabled auto-merge (squash) December 1, 2026 19:44
@zhumin8
zhumin8 merged commit ef104fe into main Dec 2, 2026
194 of 195 checks passed
@zhumin8
zhumin8 deleted the chore-fmt-spanner-jdbc branch December 2, 2026 05:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants