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

ktlint command: ./ktlint "**/src/**/*.kt" -F removes symbol ; from the end of ENUM values #1763

Closed
Kolyall opened this issue Jan 4, 2023 · 1 comment
Milestone

Comments

@Kolyall
Copy link

Kolyall commented Jan 4, 2023

Expected Behavior

enum class may contain ; at end of list values

Observed Behavior

ktlint command: ./ktlint "**/src/**/*.kt" -F
removes symbol ; from the end of list values

Steps to Reproduce

Create enum MyEnums.kt:

enum class MyEnums  {
    FIRST,
    SECOND;
    fun isFirst(){
        this == MyEnums.FIRST
    }
}

run command:
./ktlint "**/src/**/*.kt" -F
in result:

enum class MyEnums  {
    FIRST,
    SECOND // symbol `;` was removed , compile error occurs 

    fun isFirst(){
        this == MyEnums.FIRST
    }
}

Your Environment

  • Version of ktlint used: 0.48.0
  • Version of Gradle used (if applicable):
classpath 'com.android.tools.build:gradle:7.3.1'
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6-bin.zip
  • Operating System and version: Ubuntu 20.04.5 LTS
@paul-dingemans
Copy link
Collaborator

Duplicate of #1733. Is fixed in 0.48.1.

@paul-dingemans paul-dingemans added this to the 0.48.1 milestone Jan 4, 2023
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

No branches or pull requests

2 participants