-
Notifications
You must be signed in to change notification settings - Fork 506
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Multiline class declaration with superclass + interface: Interface gets moved to newline #1713
Comments
I agree that code below does not look well formatted:
The format you prefer was actually the format until and including
Althought this format looks a bit better, it is less consistent with how other argument lists are formatted. Based on example below (see https://kotlinlang.org/docs/coding-conventions.html#class-headers):
I would say that the code should have been formatted as follows:
IntelliJ IDEA default formatting however joins the opening brace
This last code sample is also accepted by KtLint |
Related to #1349 |
The new
with code style
with code styles
|
See #2119 |
Expected Behavior
is accepted formatting.
https://kotlinlang.org/docs/coding-conventions.html#class-headers mentions similar cases but not this exact one. Keeping it in the same line seems to be the most reasonable solution to me.
Observed Behavior
Missing newline after "," (wrapping)
is reported.ktLintFormat
formats it towhich is not that pretty imo :D
Steps to Reproduce
Format the above
Your Environment
.editorconfig
settings:The text was updated successfully, but these errors were encountered: