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

Unstable formatting of file with a set of comments #405

Closed
liutikas opened this issue Jun 21, 2023 · 3 comments
Closed

Unstable formatting of file with a set of comments #405

liutikas opened this issue Jun 21, 2023 · 3 comments
Labels
bug Something isn't working

Comments

@liutikas
Copy link

liutikas commented Jun 21, 2023

Repro steps

java  -cp /ssd/ssd5/androidx-main/prebuilts/androidx/external/com/facebook/ktfmt/0.44/ktfmt-0.44.jar:..all.jars com.facebook.ktfmt.cli.Main --kotlinlang-style src/androidTest/java/androidx/viewpager2/widget/SwipeTest.kt
  • Try to format the following file:
/*
 * Copyright 2018
 */

package androidx.viewpager2.widget

// endregion

// endregion

Expected

No changes are made

Actual

ktfmt format command will insert a new space after // endregion every time it is run. The file just keeps getting longer and longer by one space with every call.

Details

Using ktfmt 0.44

@davidtorosyan
Copy link
Contributor

I think this fixed by #401, but will verify before closing. I think we're working on getting a release out as well.

@hick209 hick209 added the bug Something isn't working label Sep 15, 2023
@hick209
Copy link
Contributor

hick209 commented Sep 15, 2023

I've just verified and this was indeed fixed. We do need a new release though as this is still an issue in v0.44.

I'll close once we release the next version

@hick209
Copy link
Contributor

hick209 commented Sep 18, 2023

This should be fixed with the new release v0.45

@hick209 hick209 closed this as completed Sep 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants