I'm fighting against ktlint and android studio rig...
# ktlint
p
I'm fighting against ktlint and android studio right now (AS 4.0.0, ktlint 0.37.1) Android studio always formats the code like this:
Copy code
import java.time.LocalDate
import java.time.temporal.ChronoUnit

fun test() {
  val lastActive = LocalDate.now()
  if (lastActive != null && ChronoUnit.DAYS.between(
      lastActive,
      LocalDate.now()
    ) > 30
  ) {
    println("hello")
  }
}
And then ktlint complains because it wants to have two less spaces before the argument
ChronoUnit.DAYS.between
Can someone confirm this?
r
looks like a bug, mind filing an issue? We’re considering splitting the indentation rule into more granular ones for the next release, so it’s easier to disable if something is heavily contradicting your preferences (or if there’s a bug like that 🙂)
👍 1
p