diff --git a/diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/chapter3/LineLength.kt b/diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/chapter3/LineLength.kt index 2819c32840..3701ec9e78 100644 --- a/diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/chapter3/LineLength.kt +++ b/diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/chapter3/LineLength.kt @@ -567,14 +567,14 @@ class LineLength(configRules: List) : DiktatRule( *@param node node in which to search *@param dotList mutable list of ASTNode to store nodes */ - private fun searchDot(node: ASTNode, dotList: MutableList) { + private fun searchDotOrSafeAccess(node: ASTNode, dotList: MutableList) { if (node.elementType == DOT_QUALIFIED_EXPRESSION || node.elementType == SAFE_ACCESS_EXPRESSION || node.elementType == POSTFIX_EXPRESSION) { node.getChildren(null) .filter { it.elementType == DOT_QUALIFIED_EXPRESSION || it.elementType == SAFE_ACCESS_EXPRESSION || it.elementType == POSTFIX_EXPRESSION } .forEach { - searchDot(it, dotList) + searchDotOrSafeAccess(it, dotList) } if (node.elementType != POSTFIX_EXPRESSION) { dotList.add(node)