We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I have an enum class with statics function in the companion object:
enum class Foo(val type: String){ A("a"), B("b"); companion object { fun from(value: String): Foo { return try { valueOf(value) } catch (e: IllegalArgumentException) { // find by type } } }
ktlint --format deleting the the semicolon ; and adding a trailing comma , after the companion object and raising error:
ktlint --format
;
,
enum class Foo(val type: String){ A("a"), B("b") companion object { fun from(value: String): Foo { return try { valueOf(value) } catch (e: IllegalArgumentException) { // find by type } }, }
.editorconfig
The text was updated successfully, but these errors were encountered:
Duplicate of #1733. Will be fixed in 0.48.1.
0.48.1
Sorry, something went wrong.
No branches or pull requests
Expected Behavior
I have an enum class with statics function in the companion object:
Observed Behavior
ktlint --format
deleting the the semicolon;
and adding a trailing comma,
after the companion object and raising error:Not a valid Kotlin file (12:27 expecting ';' after the last enum entry or '}' to close enum class body) (cannot be auto-corrected) ()
Steps to Reproduce
ktlint --format
Your Environment
.editorconfig
settings: not applicableThe text was updated successfully, but these errors were encountered: