Skip to content

chore: apply initial spotless formatting#24

Draft
wombatu-kun wants to merge 2 commits into
lance-format:mainfrom
wombatu-kun:chore/apply-initial-formatting
Draft

chore: apply initial spotless formatting#24
wombatu-kun wants to merge 2 commits into
lance-format:mainfrom
wombatu-kun:chore/apply-initial-formatting

Conversation

@wombatu-kun
Copy link
Copy Markdown

Summary

Stacked on top of #23 (build: add spotless, checkstyle, and enforcer plugin configuration). Marked as draft until #23 is merged — at that
point GitHub will recompute this PR's diff to show only the formatting
commits. Until then the diff includes both PRs' changes.

  • Run mvn spotless:apply on every file under src/main/java/**/*.java
    and src/test/java/**/*.java (31 files). Effect: google-java-format
    layout (2-space indent, 100-char line length), import order
    org.apache.flink,,javax,java,#, removed unused imports, license
    header rewritten to the short Apache 2.0 form.
  • Manually fix the 6 Checkstyle violations Spotless does not handle:
    • LanceInputFormat.java:295 — drop public on the LanceSplitAssigner
      constructor (RedundantModifier — the enclosing class is private).
    • LanceIndexBuilder.java:325 — wrap the Builder.m(int m) HNSW
      builder method in // checkstyle.off: MethodName /
      // checkstyle.on: MethodName. The single-letter M is the
      standard HNSW parameter; renaming would break public API.
    • LanceCatalog.java:512 — split a 110-char log message string.
    • LanceDynamicTableSource.java:280–283 — add braces to the
      if/else if operator-flip chain (NeedBraces).
  • Fix .editorconfig: Java indent_size 4 → 2 to match the actual
    google-java-format output Spotless writes. Without this, IDEs that
    honour .editorconfig would re-indent files to 4-space and fail
    mvn spotless:check on every save.
  • Bind spotless-maven-plugin and maven-checkstyle-plugin to the
    validate Maven phase (goal check). Now mvn compile (and any
    later phase) automatically enforces both, so style regressions
    fail the build.

The reformatting commit is purely mechanical — no behavioural changes,
no test changes.

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.

1 participant