From 00c02f163990a831847e170fc6c6b081daadf783 Mon Sep 17 00:00:00 2001 From: Andrey Shcheglov Date: Mon, 18 Jul 2022 15:28:06 +0300 Subject: [PATCH] Remove dead code ### What's done: * Dead code dropped (originally introduced as a part of #1364). * See also 998d0e97bf838eec12f7852568b5d4932401e707. * Original issue: #811. --- .../diktat/ruleset/rules/chapter3/files/IndentationRule.kt | 3 --- 1 file changed, 3 deletions(-) diff --git a/diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/chapter3/files/IndentationRule.kt b/diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/chapter3/files/IndentationRule.kt index 20ba432f97..58863a1741 100644 --- a/diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/chapter3/files/IndentationRule.kt +++ b/diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/chapter3/files/IndentationRule.kt @@ -12,7 +12,6 @@ import org.cqfn.diktat.ruleset.rules.DiktatRule import org.cqfn.diktat.ruleset.utils.NEWLINE import org.cqfn.diktat.ruleset.utils.SPACE import org.cqfn.diktat.ruleset.utils.TAB -import org.cqfn.diktat.ruleset.utils.calculateLineColByOffset import org.cqfn.diktat.ruleset.utils.getAllChildrenWithType import org.cqfn.diktat.ruleset.utils.getAllLeafsWithSpecificType import org.cqfn.diktat.ruleset.utils.getFilePath @@ -99,7 +98,6 @@ class IndentationRule(configRules: List) : DiktatRule( } private lateinit var filePath: String private lateinit var customIndentationCheckers: List - private lateinit var positionByOffset: (Int) -> Pair override fun logic(node: ASTNode) { if (node.elementType == FILE) { @@ -213,7 +211,6 @@ class IndentationRule(configRules: List) : DiktatRule( @Suppress("ForbiddenComment") private fun visitWhiteSpace(astNode: ASTNode, context: IndentContext) { context.maybeIncrement() - positionByOffset = astNode.treeParent.calculateLineColByOffset() val whiteSpace = astNode.psi as PsiWhiteSpace if (astNode.treeNext.isIndentDecrementing()) { // if newline is followed by closing token, it should already be indented less