Skip to content

Commit

Permalink
Fix Conflicting TOO_MANY_BLANK_LINES and BRACES_BLOCK_STRUCTURE_ERROR…
Browse files Browse the repository at this point in the history
… with empty block

### What's done:
* Fixed Conflicting TOO_MANY_BLANK_LINES and BRACES_BLOCK_STRUCTURE_ERROR with empty block in lambda
  • Loading branch information
Cheshiriks committed Mar 15, 2021
1 parent 18ae1ab commit c6f0954
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ class EmptyBlock(configRules: List<RulesConfig>) : 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) {
Expand Down

0 comments on commit c6f0954

Please sign in to comment.