Skip to content

Add trailing commas to all generated Kotlin declarations#35

Merged
joaoffcosta merged 3 commits into
mainfrom
pgloria/kotlin-syntax
Jun 25, 2026
Merged

Add trailing commas to all generated Kotlin declarations#35
joaoffcosta merged 3 commits into
mainfrom
pgloria/kotlin-syntax

Conversation

@PVGH19

@PVGH19 PVGH19 commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

Generated Kotlin now emits a trailing comma on the last element of every multi-line, comma-separated construct.

What changed

Trailing comma added to the last element of:

  • sealed-class constructors (AnalyticsEvent, AnalyticsProperty)
  • generated data class parameter lists
  • mapOf(...) and arrayOf(...) entries
  • enum entries (events, properties, destinations, special enums)

Touches the 6 Kotlin templates and the kotlin_generator spec fixtures.
Swift output is unchanged.

Effect on consumers

Regenerating in an Android project produces only trailing-comma diffs on the generated files (verified against real sheet data).

Testing

bundle exec rspec — 67 examples, 0 failures.

PVGH19 and others added 2 commits June 25, 2026 11:45
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@PVGH19 PVGH19 requested a review from joaoffcosta June 25, 2026 10:50
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@joaoffcosta joaoffcosta merged commit 704c31b into main Jun 25, 2026
6 checks passed
@joaoffcosta joaoffcosta deleted the pgloria/kotlin-syntax branch June 25, 2026 11:16
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