diff --git a/ktlint-ruleset-standard/src/main/kotlin/com/github/shyiko/ktlint/ruleset/standard/SpacingAroundCurlyRule.kt b/ktlint-ruleset-standard/src/main/kotlin/com/github/shyiko/ktlint/ruleset/standard/SpacingAroundCurlyRule.kt index 7a524f8a51..ca7e8cd6f6 100644 --- a/ktlint-ruleset-standard/src/main/kotlin/com/github/shyiko/ktlint/ruleset/standard/SpacingAroundCurlyRule.kt +++ b/ktlint-ruleset-standard/src/main/kotlin/com/github/shyiko/ktlint/ruleset/standard/SpacingAroundCurlyRule.kt @@ -20,7 +20,7 @@ class SpacingAroundCurlyRule : Rule("curly-spacing") { val spacingBefore: Boolean val spacingAfter: Boolean if (node.textMatches("{")) { - spacingBefore = prevLeaf is PsiWhiteSpace || prevLeaf is KtTokens.AT || (prevLeaf?.node?.elementType == KtTokens.LPAR && + spacingBefore = prevLeaf is PsiWhiteSpace || prevLeaf?.node?.elementType == KtTokens.AT || (prevLeaf?.node?.elementType == KtTokens.LPAR && (node.parent is KtLambdaExpression || node.parent.parent is KtLambdaExpression)) spacingAfter = nextLeaf is PsiWhiteSpace || nextLeaf?.node?.elementType == KtTokens.RBRACE } else