Mkohm / detekt-hint

Detection of design principle violations in Kotlin as a plugin to detekt.
https://mkohm.github.io/detekt-hint/
80 stars 3 forks source link

refactoring and bugfix #31

Closed Mkohm closed 4 years ago

Detekt-hintBot commented 4 years ago
1 Warning
:warning: src/main/kotlin/io/github/mkohm/detekt/hint/demo/UsingInheritanceInsteadOfComposition.kt#L21 - The class Square is using inheritance, consider using composition instead.

Does Square want to expose the complete interface (setHeight, setWidth) of Rectangle such that Square can be used where Rectangle is expected? Indicates inheritance.

Does Square? want only some/part of the behavior exposed by Rectangle? Indicates Composition.

Generated by :no_entry_sign: Danger

codecov[bot] commented 4 years ago

Codecov Report

:exclamation: No coverage uploaded for pull request base (master@825a8b7). Click here to learn what that means. The diff coverage is 75%.

Impacted file tree graph

@@          Coverage Diff           @@
##             master   #31   +/-   ##
======================================
  Coverage          ?   65%           
  Complexity        ?    19           
======================================
  Files             ?     3           
  Lines             ?    40           
  Branches          ?     7           
======================================
  Hits              ?    26           
  Misses            ?    11           
  Partials          ?     3
Impacted Files Coverage Δ Complexity Δ
...t/hint/rules/UseCompositionInsteadOfInheritance.kt 88.88% <75%> (ø) 19 <0> (?)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 825a8b7...dcad24b. Read the comment docs.