You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ktlint --format -a seemingly should break lines before operators like && to conform with Android's style guide. (Personally I like line breaks before operators better in general, FWIW, not just for Android style.)
Observed Behavior
Line breaks are inserted / moved after && regardless of -a
Steps to Reproduce
Run ktlint -a --format over input like this:
fun foo(a: Boolean, b: Boolean): Boolean {
return a
&& b
}
ktlint -a will reformat this by placing && on the same line as a, even though this input is correctly formatted per Android style.
Your Environment
Version of ktlint used: 0.35
Name and version (or code for custom task) of integration used (Gradle plugin, Maven plugin, command line, custom Gradle task): command line
Version of Gradle used (if applicable):
Operating System and version: Linux
Link to your project (if it's a public repository):
The text was updated successfully, but these errors were encountered:
Reference: https://developer.android.com/kotlin/style-guide#where_to_break
Expected Behavior
ktlint --format -a
seemingly should break lines before operators like&&
to conform with Android's style guide. (Personally I like line breaks before operators better in general, FWIW, not just for Android style.)Observed Behavior
Line breaks are inserted / moved after
&&
regardless of-a
Steps to Reproduce
Run
ktlint -a --format
over input like this:ktlint -a
will reformat this by placing&&
on the same line asa
, even though this input is correctly formatted per Android style.Your Environment
The text was updated successfully, but these errors were encountered: