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 41da95c commit 262c513
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ 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) &&
classPsi.node.getFirstChildWithType(MODIFIER_LIST)?.getChildren(null)?.all { it.elementType in goodModifiers } != false) {
!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 262c513

Please sign in to comment.