-
Notifications
You must be signed in to change notification settings - Fork 512
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
Intellij disagree with ktlint for code with for
#1350
Comments
This issue is not related to issue mentioned before. You're right that it conflicts with IntelliJ formatting. Although, I do like the ktlint style much more, it should indeed being considered as a bug because we do no want ktlint to produce code that is not accepted by the IntelliJ default formatting.
|
I agree with you |
…ntil https://youtrack.jetbrains.com/issue/IDEA-293691/Format-Kotlin-for-loop is fixed. The wrapping rule no longer forces the for-statement to be wrapped if only the expression contains a newline. Closes pinterest#1350
This issue should be fixed in IntelliJ IDEA, see https://youtrack.jetbrains.com/issue/IDEA-293691/Format-Kotlin-for-loop. For the time being, the code will be accepted without errors. I have also fixed the
|
Default formatting of IntelliJ is ugly and needs to be fixed (https://youtrack.jetbrains.com/issue/IDEA-293691/Format-Kotlin-for-loop). The wrapping rule no longer forces the for-statement to be wrapped if only the expression contains a newline. (#1464) Closes #1350
Again, thank you so much for the linter! Just a small bug: The following code is formatted in intellij idea. But ktlint says it has several formatting errors.
p.s. the code seems artificial, just because I see ktlint bug in real code and I replace all variable names with fake names (with the same length) to avoid leaking internal code.
The text was updated successfully, but these errors were encountered: