From 3a3e1a2dbd72178fe99aaa921ecf91a485173ddb Mon Sep 17 00:00:00 2001 From: aktsay6 Date: Tue, 19 Jan 2021 17:10:29 +0300 Subject: [PATCH] feature/inline-classes(#698) ### What's done: * Fixed bugs --- .../org/cqfn/diktat/ruleset/rules/classes/InlineClassesRule.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/classes/InlineClassesRule.kt b/diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/classes/InlineClassesRule.kt index 8340c04832..9fb0952cbe 100644 --- a/diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/classes/InlineClassesRule.kt +++ b/diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/classes/InlineClassesRule.kt @@ -40,8 +40,9 @@ class InlineClassesRule(private val configRule: List) : Rule("inlin } private fun handleClasses(classPsi: KtClass) { + // Fixme: for now we can't understand whether it extends class or interface if (hasValidProperties(classPsi) - && !classPsi.node.hasChildOfType(SUPER_TYPE_LIST) // Fixme: for now we can't understand whether it extends class or interface + && !classPsi.node.hasChildOfType(SUPER_TYPE_LIST) && classPsi.node.getFirstChildWithType(MODIFIER_LIST)?.getChildren(null)?.all { it.elementType in goodModifiers } != false) { INLINE_CLASS_CAN_BE_USED.warnAndFix(configRule, emitWarn, isFixMode, "class ${classPsi.name}", classPsi.node.startOffset, classPsi.node) { // Fixme: since it's an experimental feature we shouldn't do fixer