From abb43bf56b8a69f59faacc6a3f999814e3ba16f6 Mon Sep 17 00:00:00 2001 From: Pleshkova Daria Date: Tue, 31 Oct 2023 16:05:06 +0300 Subject: [PATCH] Fixed warning `FUNCTION_BOOLEAN_PREFIX` on `operator fun` Closes #1723 --- .../kotlin/com/saveourtool/diktat/ruleset/utils/AstNodeUtils.kt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/utils/AstNodeUtils.kt b/diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/utils/AstNodeUtils.kt index d7ccc3a68d..a2bb342f1b 100644 --- a/diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/utils/AstNodeUtils.kt +++ b/diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/utils/AstNodeUtils.kt @@ -186,6 +186,7 @@ fun ASTNode.isAnonymousFunction(): Boolean { /** * Checks if the function has boolean return type + * @return true if the function has boolean return type */ fun ASTNode.hasBooleanReturnType(): Boolean { val functionReturnType = this.findChildAfter(VALUE_PARAMETER_LIST, KtNodeTypes.TYPE_REFERENCE)?.text @@ -194,6 +195,7 @@ fun ASTNode.hasBooleanReturnType(): Boolean { /** * Checks if the function is an operator function + * @return true if the function is an operator function */ fun ASTNode.isOperatorFun(): Boolean { val modifierListNode = this.findChildByType(MODIFIER_LIST)