-
Notifications
You must be signed in to change notification settings - Fork 503
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 0.37.0] New indentation rule issues #764
Comments
Hi, yes the formerly-experimental-now-standard rule is more aggressive with inserting newlines, and I understand IDEA also accepts the formatting you've shown in the issue. We'll discuss internally whether any changes need to be made. |
After some discussion we decided to split indentation rule into more granular rules, that could be disabled via |
@Tapchicoma what's the correct rule to be disabled in this case? Is it For clarity here's an example (this is accepted by Android Studio auto-format):
is formatted by the
Thanks |
Yes, it is the entire |
I think that |
Yes, please, this currently stops us from upgrading to 0.37 or later, otherwise we'd face thousands of lines of reformatting :( |
same here, we don't want the curly braces to be placed in new lines! |
Any news about this? |
@Tapchicoma I'm guessing the 0.41.0 milestone is incorrect since it has been released? any other updates here? |
ktlint's indentation issue has also been fixed, allowing us to delete our custom rule. cc pinterest/ktlint#764
Expected Behavior
When I have statements like those:
myStatement(parameter1, parameter2, parameter3) myOtherStatement(parameter1, lambda = { otherStatement })
I expect the linter to report nothing
Observed Behavior
I get a bunch of:
Your Environment
With ktlint up to
0.36.0
no problems. I believe it's something with the new indentation rule promoted from experimental. Is it possible to keep the "old" behaviour? I find it excessive to have very short statements split on multiple lines only for aktlint
rule.The text was updated successfully, but these errors were encountered: