Kotlin / Kotlin/ktfmt

Kotlin DSL formatting looks messy

Open
#206 8 comments 2 reactions 0 assignees View on GitHub
Dominant language
Kotlin
Stars
1.3k
Forks
116
Avg merge
4d 10h
Merged PRs (30d)
15

Description

## Actual Behavior
```
foo =
fooDsl {
bar +=
barDsl {
baz =
bazDsl {
bal = 1
}
}
}
```

## Expected Behavior
```
foo = fooDsl {
bar += barDsl {
baz = bazDsl {
bal = 1
}
}
}
```

Contributor guide

Open the contributing guide

Research direction

Reproduce the issue with the Kotlin DSL snippet in the report and compare the actual output with the expected formatting. Trace the formatter path that handles nested DSL assignments and verify that the output matches the expected indentation and inline assignments for this example.

Written by the indexing model from the issue text.

Assessment

Tech stack
kotlin
Domain
tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.