Skip to content

ci: fast Java formatting check using google-java-format native binary#1984

Merged
jaydeluca merged 1 commit intomainfrom
native-lint-java
Mar 21, 2026
Merged

ci: fast Java formatting check using google-java-format native binary#1984
jaydeluca merged 1 commit intomainfrom
native-lint-java

Conversation

@zeitlinger
Copy link
Member

@zeitlinger zeitlinger commented Mar 20, 2026

Summary

  • Replaces Maven-based spotlessCheck in the lint:spotless mise task with google-java-format native binary (lint:java)
  • Checks only changed files (vs origin/main), runs in ~42ms instead of minutes
  • CI still runs the full spotlessCheck via Maven as the authoritative check
  • Adds ubi:google/google-java-format as a mise tool (Renovate will keep it current)

Test plan

  • mise run lint:java passes with no changed Java files
  • mise run lint:java detects formatting issues in changed files
  • mise run fix auto-formats changed Java files
  • CI spotlessCheck still runs and passes

@zeitlinger zeitlinger changed the title ci: use google-java-format native binary for local lint ci: fast Java formatting check using google-java-format native binary Mar 20, 2026
@zeitlinger zeitlinger marked this pull request as ready for review March 20, 2026 16:10
Replaces the slow Maven-based spotlessCheck in the lint:java mise task
with google-java-format native binary (~42ms for changed files).
CI still runs the full spotlessCheck via Maven.

Signed-off-by: Gregor Zeitlinger <gregor.zeitlinger@grafana.com>
@jaydeluca jaydeluca merged commit 6beb7fd into main Mar 21, 2026
9 checks passed
@jaydeluca jaydeluca deleted the native-lint-java branch March 21, 2026 11:29
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