Skip to content

Commit

Permalink
feature/inline-classes(#698)
Browse files Browse the repository at this point in the history
### What's done:
  * Fixed bugs
  • Loading branch information
aktsay6 committed Jan 19, 2021
1 parent 0db1a08 commit 3a3e1a2
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,9 @@ class InlineClassesRule(private val configRule: List<RulesConfig>) : 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
Expand Down

0 comments on commit 3a3e1a2

Please sign in to comment.