Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add trailing comma support to other non-google styles #442

Closed
hongping-quora opened this issue Mar 13, 2024 · 12 comments
Closed

add trailing comma support to other non-google styles #442

hongping-quora opened this issue Mar 13, 2024 · 12 comments
Labels
enhancement New feature or request formatting-discussions Discussions about how formatting should look like, when there's no clear consensus.
Milestone

Comments

@hongping-quora
Copy link

It seems google-style now supports trailing commas, wondering if this can be applied to other styles too? Thanks!

fa78077

@hick209
Copy link
Contributor

hick209 commented Mar 25, 2024

What styles did you have in mind to add this feature to @hongping-quora?

@hongping-quora
Copy link
Author

All the other styles if possible (default, dropbox, and kotlinLang), or maybe flag/option to turn in on?

#427 (comment)

@hick209 hick209 added enhancement New feature or request formatting-discussions Discussions about how formatting should look like, when there's no clear consensus. labels Mar 26, 2024
@albin-mullvad
Copy link

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.

@hick209
Copy link
Contributor

hick209 commented May 3, 2024

This is part of the 1.0 proposal (#451 (comment))

@jdemeulenaere
Copy link

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 :-)

@hick209 hick209 added this to the ktfmt 1.0 milestone Jun 5, 2024
@hick209
Copy link
Contributor

hick209 commented Jun 11, 2024

@omarismail94, would you (Android X) be okay with this for kotlinlang?

@omarismail94
Copy link

Yep, SGTM!

facebook-github-bot pushed a commit that referenced this issue Jun 18, 2024
Summary:
As requested on
#216
#442

Reviewed By: davidtorosyan

Differential Revision: D58585873

fbshipit-source-id: 61662ce4b21ad56b5554eb2275cd2e9341ccb1a4
@hick209
Copy link
Contributor

hick209 commented Jun 18, 2024

Trailing commas will be the default starting on 1.0.0

cec9b50

@hick209 hick209 closed this as completed Jun 18, 2024
@jdemeulenaere
Copy link

That's great, thanks! When can we expect 1.0.0 to be released? :-)

@hick209
Copy link
Contributor

hick209 commented Jun 19, 2024

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.

@jdemeulenaere
Copy link

Any update on the 1.0.0 release by any chance?

Thanks!

@hick209
Copy link
Contributor

hick209 commented Aug 27, 2024

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

github-merge-queue bot referenced this issue in slackhq/foundry Aug 28, 2024
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [com.facebook:ktfmt](https://togithub.com/facebookincubator/ktfmt) |
dependencies | minor | `0.51` -> `0.52` |

---

> [!WARNING]
> Some dependencies could not be looked up. Check the Dependency
Dashboard for more information.

---

### Release Notes

<details>
<summary>facebookincubator/ktfmt (com.facebook:ktfmt)</summary>

###
[`v0.52`](https://togithub.com/facebookincubator/ktfmt/blob/HEAD/CHANGELOG.md#052)

##### Fixed

- IntelliJ plugin crash
([https://github.com/facebook/ktfmt/pull/501](https://togithub.com/facebook/ktfmt/pull/501))
- Ordering of `@property` and `@param` in KDoc
([https://github.com/facebook/ktfmt/pull/498](https://togithub.com/facebook/ktfmt/pull/498))
- Annotation in return expressions
([https://github.com/facebook/ktfmt/issues/497](https://togithub.com/facebook/ktfmt/issues/497))

##### Changed

- KotlinLang style also managing trailing commas
([https://github.com/facebook/ktfmt/issues/216](https://togithub.com/facebook/ktfmt/issues/216),
[https://github.com/facebook/ktfmt/issues/442](https://togithub.com/facebook/ktfmt/issues/442))
- Converted IntelliJ plugin to Kotlin
([https://github.com/facebook/ktfmt/pull/502](https://togithub.com/facebook/ktfmt/pull/502))

##### Added

- More stability tests
([https://github.com/facebook/ktfmt/pull/488](https://togithub.com/facebook/ktfmt/pull/488))
- Custom profile in plugin settings, mirroring Gradle/Maven plugins
([https://github.com/facebook/ktfmt/pull/503](https://togithub.com/facebook/ktfmt/pull/503))

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever PR is behind base branch, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Renovate
Bot](https://togithub.com/renovatebot/renovate).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOC40NS4wIiwidXBkYXRlZEluVmVyIjoiMzguNTIuMCIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOltdfQ==-->

---------

Co-authored-by: Zac Sweers <pandanomic@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request formatting-discussions Discussions about how formatting should look like, when there's no clear consensus.
Projects
None yet
Development

No branches or pull requests

5 participants