Skip to content

fix: make Kotlin formatting consistent locally and in CI - #867

Open
apcha-oai wants to merge 1 commit into
mainfrom
apcha/java-consistent-formatter-scope
Open

fix: make Kotlin formatting consistent locally and in CI#867
apcha-oai wants to merge 1 commit into
mainfrom
apcha/java-consistent-formatter-scope

Conversation

@apcha-oai

Copy link
Copy Markdown
Contributor

Summary

Make Kotlin formatting consistent across developer machines, CI, and SDK updates. Today, scripts/format and scripts/lint select different implementations depending on whether ktfmt is on PATH. The standalone path includes handwritten buildSrc sources, while the Gradle path only checks SDK modules. That lets formatting drift pass CI and later appear as unrelated changes during an SDK update.

Use the repository-pinned Gradle formatter for both entry points, include buildSrc/src in the root Kotlin tasks, and bring the two existing policy files into compliance. This prevents repeat formatting churn without changing SDK behavior or upgrading ktfmt.

Implementation

Share the existing ktfmt task definition between the root project and Kotlin modules. Preserve module-specific tasks and the scripts/kotlin-format entry point, and document the common formatting scope.

@apcha-oai
apcha-oai marked this pull request as ready for review August 17, 2026 04:44
@apcha-oai
apcha-oai requested a review from a team as a code owner August 17, 2026 04:44
@openai-sdks

openai-sdks Bot commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

OkTest Summary

237/237 SDK tests passed in 17.335s for Java SDK PR #867.

Test results — 42 files
Test Result Time
tests/chat-completions-complex-body.test.ts ✅ Passed 684ms
tests/chat-completions-create.test.ts ✅ Passed 676ms
tests/chat-completions-stream.test.ts ✅ Passed 367ms
tests/files-content-binary.test.ts ✅ Passed 237ms
tests/files-create-multipart.test.ts ✅ Passed 413ms
tests/files-list-pagination.test.ts ✅ Passed 257ms
tests/initialize-config.test.ts ✅ Passed 378ms
tests/instance-isolation.test.ts ✅ Passed 224ms
tests/models-list.test.ts ✅ Passed 173ms
tests/responses-background-lifecycle.test.ts ✅ Passed 311ms
tests/responses-body-method-errors.test.ts ✅ Passed 529ms
tests/responses-cancel-timeout.test.ts ✅ Passed 233ms
tests/responses-cancel.test.ts ✅ Passed 410ms
tests/responses-compact-retries.test.ts ✅ Passed 484ms
tests/responses-compact.test.ts ✅ Passed 408ms
tests/responses-create-advanced-stream.test.ts ✅ Passed 319ms
tests/responses-create-advanced.test.ts ✅ Passed 1.307s
tests/responses-create-disconnect.test.ts ✅ Passed 1.189s
tests/responses-create-errors.test.ts ✅ Passed 376ms
tests/responses-create-malformed-api-responses.test.ts ✅ Passed 333ms
tests/responses-create-retries.test.ts ✅ Passed 339ms
tests/responses-create-stream-failures.test.ts ✅ Passed 212ms
tests/responses-create-stream-timeout.test.ts ✅ Passed 243ms
tests/responses-create-stream-wire.test.ts ✅ Passed 6.489s
tests/responses-create-stream.test.ts ✅ Passed 420ms
tests/responses-create-terminal-states.test.ts ✅ Passed 423ms
tests/responses-create-timeout.test.ts ✅ Passed 238ms
tests/responses-create.test.ts ✅ Passed 863ms
tests/responses-delete.test.ts ✅ Passed 268ms
tests/responses-input-items-errors.test.ts ✅ Passed 286ms
tests/responses-input-items-list.test.ts ✅ Passed 309ms
tests/responses-input-items-options.test.ts ✅ Passed 199ms
tests/responses-input-tokens-count-timeout.test.ts ✅ Passed 249ms
tests/responses-input-tokens-count.test.ts ✅ Passed 405ms
tests/responses-malformed-inputs.test.ts ✅ Passed 5.291s
tests/responses-not-found-errors.test.ts ✅ Passed 428ms
tests/responses-parse.test.ts ✅ Passed 672ms
tests/responses-retrieve-retries.test.ts ✅ Passed 394ms
tests/responses-retrieve.test.ts ✅ Passed 429ms
tests/responses-stored-method-errors.test.ts ✅ Passed 1.071s
tests/retry-behavior.test.ts ✅ Passed 3.537s
tests/sdk-error-shape.test.ts ✅ Passed 403ms

View OkTest run #31995497724

SDK merge (ba5931eae50a) · head (c94f53c33b92) · base (fcdcc7ee0414) · OkTest (7e7850017529)

@apcha-oai
apcha-oai enabled auto-merge (squash) August 17, 2026 04:49
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