Skip to content

Commit

Permalink
Reverted #62
Browse files Browse the repository at this point in the history
  • Loading branch information
shyiko committed Jul 24, 2017
1 parent 9909af5 commit e364c90
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class SpacingAroundCurlyRule : Rule("curly-spacing") {
val spacingBefore: Boolean
val spacingAfter: Boolean
if (node.textMatches("{")) {
spacingBefore = prevLeaf is PsiWhiteSpace || prevLeaf?.node?.elementType == KtTokens.AT || (prevLeaf?.node?.elementType == KtTokens.LPAR &&
spacingBefore = prevLeaf is PsiWhiteSpace || (prevLeaf?.node?.elementType == KtTokens.LPAR &&
(node.parent is KtLambdaExpression || node.parent.parent is KtLambdaExpression))
spacingAfter = nextLeaf is PsiWhiteSpace || nextLeaf?.node?.elementType == KtTokens.RBRACE
} else
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ class SpacingAroundCurlyRuleTest {
@Test
fun testLint() {
assertThat(SpacingAroundCurlyRule().lint("fun emit() { }")).isEmpty()
assertThat(SpacingAroundCurlyRule().lint("fun emit() { val a = a@{ } }")).isEmpty()
assertThat(SpacingAroundCurlyRule().lint("fun emit() {}")).isEmpty()
assertThat(SpacingAroundCurlyRule().lint("fun main() { val v = if (true){return 0} }"))
.isEqualTo(listOf(
Expand Down

0 comments on commit e364c90

Please sign in to comment.