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
package test
import java.nio.file.Files
import java.nio.file.Paths
import java.util.Objects
object TestData {
fun loadString(dataset: String): String {
val path = Paths.get(Objects.requireNonNull(TestData::class.java.getResource(dataset)).toURI())
return String(Files.readAllBytes(path))
}
}
Observed Behavior
For some reason (I assume because of the two | in the layout config and not having any imports that match *), I got two extra line breaks in the file:
package test
import java.nio.file.Files
import java.nio.file.Paths
import java.util.Objects
object TestData {
fun loadString(dataset: String): String {
val path = Paths.get(Objects.requireNonNull(TestData::class.java.getResource(dataset)).toURI())
return String(Files.readAllBytes(path))
}
}
It seems that the number of extra line breaks is equals the number of | in the config, but if I remove the extra line breaks, I have to run ktlint -F twice until it stabilises, which makes the issue even worse.
Steps to Reproduce
Use the configuration and file above.
Your Environment
Version of ktlint used: 0.48.2
Relevant parts of the .editorconfig settings: (mentioned above)
The text was updated successfully, but these errors were encountered:
Expected Behavior
I'm currently using the
import-ordering
rule with the following config:I'd expect one of my files to be formatted like:
Observed Behavior
For some reason (I assume because of the two
|
in the layout config and not having any imports that match*
), I got two extra line breaks in the file:It seems that the number of extra line breaks is equals the number of
|
in the config, but if I remove the extra line breaks, I have to runktlint -F
twice until it stabilises, which makes the issue even worse.Steps to Reproduce
Use the configuration and file above.
Your Environment
.editorconfig
settings: (mentioned above)The text was updated successfully, but these errors were encountered: