-
Notifications
You must be signed in to change notification settings - Fork 520
Closed
Milestone
Description
Expected Behavior
Given:
class DB {
operator fun <T> get(query: DB.() -> T): T = TODO()
}
val db = DB()
val query = db[{ 123 }]so, an operator get function with a lambda argument inside, KtLint should be happy with this notation. It is accepted by IntelliJ.
Observed Behavior
We get a linting error:
Lint error > [standard:curly-spacing] Missing spacing before "{".
If I run the formatter instead it performs a fix and reverts it again:
Format fixed > [standard:curly-spacing] Missing spacing before "{"
Format fixed > [standard:square-brackets-spacing] Unexpected spacing after '['
Steps to Reproduce
See the example above.
Your Environment
- KtLint 1.2.1
- Using https://github.com/jeremymailen/kotlinter-gradle/tree/master 4.3.0
ktlint_code_style = intellij_idea
Metadata
Metadata
Assignees
Labels
No labels