Skip to content

Commit

Permalink
Review
Browse files Browse the repository at this point in the history
### What's done:
* Review
  • Loading branch information
kgevorkyan committed Jul 16, 2021
1 parent 56cf4fa commit ea4ca15
Showing 1 changed file with 2 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -445,21 +445,15 @@ class LineLength(configRules: List<RulesConfig>) : DiktatRule(
node.getChildren(null).forEach {
if (it.elementType in propertyList) {
if (it.elementType == REFERENCE_EXPRESSION && it.treeParent?.elementType == CALL_EXPRESSION) {
binList.tryAdd(it.treeParent)
binList.add(it.treeParent)
} else {
binList.tryAdd(it)
binList.add(it)
}
}
dfsForProperty(it, binList)
}
}

private fun MutableList<ASTNode>.tryAdd(node: ASTNode) {
if (node !in this) {
this.add(node)
}
}

private fun createSplitProperty(wrongProperty: LongLineFixableCases.Property) {
val node = wrongProperty.node
val indexLastSpace = wrongProperty.indexLastSpace
Expand Down

0 comments on commit ea4ca15

Please sign in to comment.