Skip to content

Commit

Permalink
bugfix/newlinesrule(#748)
Browse files Browse the repository at this point in the history
### What's done:
  * Fixed bugs
  • Loading branch information
aktsay6 committed Feb 9, 2021
1 parent 2a2e236 commit 46b1568
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ class NewlinesRule(configRules: List<RulesConfig>) : DiktatRule(
return
}

if (node.elementType == VALUE_ARGUMENT_LIST && node.treePrev != null && node.treePrev.elementType == REFERENCE_EXPRESSION) {
if (node.elementType == VALUE_ARGUMENT_LIST && node.siblings(forward = false).any { it.elementType == REFERENCE_EXPRESSION }) {
// check that it is not function invocation, but only supertype constructor calls
return
}
Expand Down

0 comments on commit 46b1568

Please sign in to comment.