io.github.mkohm.detekt.hint.rules / OpenClosedPrinciple
OpenClosedPrinciple
class OpenClosedPrinciple : Rule
Open closed principle rule. Only supports catching the easiest cases. Not complex when expressions, with type checking and use of enums.
Supported: when (enum) { Color.RED -> … Color.Blue -> … … }
when { a is Square -> … b is Circle -> … … }
Constructors
| <init> | OpenClosedPrinciple(config: Config = Config.empty)Open closed principle rule. Only supports catching the easiest cases. Not complex when expressions, with type checking and use of enums. |
Properties
| issue | val issue: Issue |
Functions
| visitWhenExpression | fun visitWhenExpression(expression: KtWhenExpression): Unit |