Colton Idle
09/25/2021, 1:42 PMNote thatDoes it? I'd say in general it works really well. 😄 I've had a way better experience than ktlint. Should the docs highlight any of these rough edges so that it's easier (from the maintainers POV) what is still a rough experience?still has some rough edges which we're constantly working on fixing.ktfmt
Colton Idle
10/12/2021, 1:42 PM// version and style are optional
spotless { kotlin { ktfmt('0.29').kotlinlangStyle() } }
From the ktfmt website ^
Does that mean that if I omit the ktfmt version, it will always use the latest?Colton Idle
10/12/2021, 9:33 PMNote: There is no configurability as to the formatter's algorithm for formatting (apart fromIt looks like when using spotless there are four styles? 1. default (no style selected) 2. dropbox 3. google 4. kotlin Should those be added to the readme, or are they the same or something?). This is a deliberate design decision to unify our code formatting on a single format.--dropbox-style
Colton Idle
12/15/2021, 5:10 AMColton Idle
12/18/2021, 8:29 AMpablisco
06/14/2022, 10:05 AMAaron Shakibpanah
08/01/2022, 2:34 PMJavier
08/01/2022, 3:02 PMAaron Shakibpanah
08/01/2022, 3:11 PMJavier
08/01/2022, 3:17 PMAaron Shakibpanah
08/01/2022, 7:13 PMAaron Shakibpanah
08/01/2022, 7:13 PMColton Idle
08/08/2022, 4:06 PMandrei.heidelbacher
08/21/2022, 9:53 PMpardom
09/13/2022, 2:45 PMspotless {
kotlin {
ktfmt("0.40").kotlinlangStyle().configure { optionsConfiguration ->
optionsConfiguration.setMaxWidth(120)
}
}
}
And we'd like our IDEs to behave the same.Carmi Grushko
09/27/2022, 7:16 PMgammax
09/28/2022, 12:25 AMJavier
12/29/2022, 1:47 PMkts
file? Looks like context receivers are not being detected in tests because the associated Psi is for a kts file, cc @UserColton Idle
02/18/2023, 12:29 AMColton Idle
03/01/2023, 12:03 AMpardom
03/08/2023, 8:40 PMchristophsturm
06/20/2023, 8:08 AMval context = describe("The Failgood DSL") {
...
}
to this:
val context =
describe("The Failgood DSL") {
...
}
its the dsl of my test runner and that formatting costs me one indentation level.Chris Lee
07/29/2023, 8:55 PMChris Lee
07/29/2023, 10:00 PMProperty
instances, allowing =
(delegating to .set()
).
IntelliJ 2023.2 fixed its erroneous detection of org.gradle.kotlin.dsl.assign
as unused.
ktfmt removes org.gradle.kotlin.dsl.assign
resulting in a compilation failure, though not even getting there on CI as it first checks if anything needs to be formatted and fails on this erroneous change.
Doesn’t appear to be a way to workaround this.
Ticket.christophsturm
10/15/2023, 6:38 PM/**
- * Lifecycle functions for resources that are used by tests.
- * This is a separate interface because it is available in the ContextDSL and in the TestDSL
+ * Lifecycle functions for resources that are used by tests. This is a separate interface because it
+ * is available in the ContextDSL and in the TestDSL
*/
I think the first version is more readable because each sentence has its own line.Levi
11/20/2023, 8:51 PM--include-only
option?stefanem
11/22/2023, 3:00 PMstefanem
11/22/2023, 3:01 PMLevi
11/27/2023, 8:31 PM.kts
files for me. Is it not supposed to be able to?Ali Naqvi
12/18/2023, 5:35 PM