Skip to content

Commit

Permalink
fixed EmptyBlock
Browse files Browse the repository at this point in the history
  • Loading branch information
nulls committed Oct 31, 2022
1 parent a1ad159 commit 4755b0f
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ class EmptyBlock(configRules: List<RulesConfig>) : DiktatRule(

private fun searchNode(node: ASTNode, configuration: EmptyBlockStyleConfiguration) {
val newNode = node.findLBrace()?.treeParent ?: return
if (!isAllowedEmptyBlock(node) && node.isBlockEmpty()) {
if (!isAllowedEmptyBlock(newNode) && newNode.isBlockEmpty()) {
checkEmptyBlock(newNode, configuration)
}
}
Expand Down

0 comments on commit 4755b0f

Please sign in to comment.