-
Notifications
You must be signed in to change notification settings - Fork 510
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
Multiple statements on one line disallowed #2220
Comments
Thanks for the quick reply! And thanks for all your work on this project! I'm already disabling rules selectively, but would prefer not to disable
to
The logic also seems to differ for commas and semi-colons: |
P.S. this isn't an edge case, we use protobufs extensively and for short protobufs it's way too verbose for every constructor:
to be expanded out to 4 lines. |
Oops, I did not read careful enough. I thought this was only done by the |
To make it even worse, the
I vaguely recall some troubles with dependencies between |
The Kotlin guideline are quite clear about this. https://kotlinlang.org/docs/coding-conventions.html#semicolons:
|
I decided to fix it in the |
Thanks! |
Expected Behavior
Code with multiple statements on one line separated with a semi-colon should be allowed, e.g.:
Observed Behavior
Running ktlint on a file containing only the above code reports:
Steps to Reproduce
Your Environment
0.50.0
.editorconfig
settings:ktlint_standard_comment-wrapping = disabled
command line
Linux vm-ashinn2 5.15.0-1031-gcp #38-Ubuntu SMP Tue Feb 28 20:44:51 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
The text was updated successfully, but these errors were encountered: