Closed hongping-quora closed 3 months ago
What styles did you have in mind to add this feature to @hongping-quora?
All the other styles if possible (default, dropbox, and kotlinLang), or maybe flag/option to turn in on?
https://github.com/facebook/ktfmt/pull/427#issuecomment-1751652795
This would be a great improvement! We're currently considering whether we should change style or tool just to get a consistent (and preferrably deterministic) way of handling trailing commas.
This is part of the 1.0 proposal (https://github.com/facebook/ktfmt/discussions/451#discussioncomment-9305741)
In Android we are using the kotlinlang style and being able to support trailing commas without having to completely format all our files with a different style would be really great :-)
@omarismail94, would you (Android X) be okay with this for kotlinlang?
Yep, SGTM!
Trailing commas will be the default starting on 1.0.0
https://github.com/facebook/ktfmt/commit/cec9b501428d5236c306ce2b50adc4cbe0338ffe
That's great, thanks! When can we expect 1.0.0 to be released? :-)
We don't have a particular timeline in place, but we are currently testing the changes for it. If all is good and the API is stable, you could expect us to have it by July.
Any update on the 1.0.0 release by any chance?
Thanks!
Update is that there was some push back internally on some of the changes from 1.0.
We still pushed an update that included trailing comma to kotlinlang style though and hopefully this would help ease the transition and at least something this issues here.
Let me know if you have more questions, @jdemeulenaere
It seems google-style now supports trailing commas, wondering if this can be applied to other styles too? Thanks!
https://github.com/facebook/ktfmt/commit/fa78077aadf86d45f5ef89d1a044de67ce07cb8f