Skip to content

Commit a90cf2d

Browse files
committed
Data class rule: removing several cases from the scope of the inspection
### What's done: - review notes
1 parent 11f5467 commit a90cf2d

File tree

1 file changed

+2
-2
lines changed
  • diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/chapter6/classes

1 file changed

+2
-2
lines changed

diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/chapter6/classes/DataClassesRule.kt

+2-2
Original file line numberDiff line numberDiff line change
@@ -97,14 +97,14 @@ class DataClassesRule(configRules: List<RulesConfig>) : DiktatRule(
9797
.none { it.elementType in badModifiers } &&
9898
classBody?.getAllChildrenWithType(FUN)
9999
?.isEmpty()
100-
?: false &&
100+
?: false &&
101101
getFirstChildWithType(SUPER_TYPE_LIST) == null
102102
}
103103
return classBody?.getFirstChildWithType(FUN) == null &&
104104
getFirstChildWithType(SUPER_TYPE_LIST) == null &&
105105
// if there is any prop with logic in accessor then don't recommend to convert class to data class
106106
classBody?.let(::areGoodProps)
107-
?: true
107+
?: true
108108
}
109109

110110
/**

0 commit comments

Comments
 (0)