From c6f0954ca0c0a592ab425cbd9e805a95f79591a0 Mon Sep 17 00:00:00 2001 From: Cheshiriks Date: Mon, 15 Mar 2021 13:25:09 +0300 Subject: [PATCH] Fix Conflicting TOO_MANY_BLANK_LINES and BRACES_BLOCK_STRUCTURE_ERROR with empty block ### What's done: * Fixed Conflicting TOO_MANY_BLANK_LINES and BRACES_BLOCK_STRUCTURE_ERROR with empty block in lambda --- .../kotlin/org/cqfn/diktat/ruleset/rules/chapter3/EmptyBlock.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/chapter3/EmptyBlock.kt b/diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/chapter3/EmptyBlock.kt index eba98545c6..f0405440c5 100644 --- a/diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/chapter3/EmptyBlock.kt +++ b/diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/chapter3/EmptyBlock.kt @@ -37,7 +37,7 @@ class EmptyBlock(configRules: List) : DiktatRule( } private fun isNewLine(node: ASTNode) = - node.findChildByType(WHITE_SPACE)?.text?.contains("\n") ?: true + node.findChildByType(WHITE_SPACE)?.text?.contains("\n") ?: false @Suppress("UnsafeCallOnNullableType", "TOO_LONG_FUNCTION") private fun checkEmptyBlock(node: ASTNode, configuration: EmptyBlockStyleConfiguration) {