Skip to content

Commit

Permalink
Remove dead code (#1457)
Browse files Browse the repository at this point in the history
### What's done:

 * Dead code dropped (originally introduced as a part of #1364).
 * See also 998d0e9.
 * Original issue: #811.
  • Loading branch information
0x6675636b796f75676974687562 authored Jul 18, 2022
1 parent 54c8cce commit 7dd0261
Showing 1 changed file with 0 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -99,7 +98,6 @@ class IndentationRule(configRules: List<RulesConfig>) : DiktatRule(
}
private lateinit var filePath: String
private lateinit var customIndentationCheckers: List<CustomIndentationChecker>
private lateinit var positionByOffset: (Int) -> Pair<Int, Int>

override fun logic(node: ASTNode) {
if (node.elementType == FILE) {
Expand Down Expand Up @@ -213,7 +211,6 @@ class IndentationRule(configRules: List<RulesConfig>) : 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
Expand Down

0 comments on commit 7dd0261

Please sign in to comment.