Skip to content

Commit

Permalink
Fixed #327 - 'Missing newline before ")"'
Browse files Browse the repository at this point in the history
  • Loading branch information
Stanley Shyiko committed Feb 4, 2019
1 parent 195fcb7 commit b6f9ad5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ class ParameterListWrappingRule : Rule("parameter-list-wrapping") {
paramInnerIndentAdjustment = adjustedIndent.length - prevLeaf.textLength
(prevLeaf as LeafPsiElement).rawReplaceWithText(adjustedIndent)
}
} else {
} else if (prevLeaf?.prevLeafIgnoringWhitespaceAndComments()?.node?.elementType != KtTokens.LPAR) {
emit(child.startOffset, errorMessage(child), true)
if (autoCorrect) {
paramInnerIndentAdjustment = intendedIndent.length - child.psi.column
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,8 @@ class ParameterListWrappingRuleTest {
b: Any,
c: Any) {
}
fun f() {}
fun f(/**/) {}
""".trimIndent()
)).isEqualTo(
listOf(
Expand Down

0 comments on commit b6f9ad5

Please # to comment.