Skip to content

v0.1.9

Choose a tag to compare

@jonbaldie jonbaldie released this 10 Jun 07:06
db1198e

Added

  • New Design/LackOfCohesionOfMethods rule (messgo-native, no PHPMD analog) computing the LCOM4 cohesion metric per struct type: methods are linked when they use a common field or call one another through the receiver, and the metric is the number of disconnected method groups. A value above the maximum property (default 1) is reported — the type bundles unrelated responsibilities and could be split, one type per group. Methods that touch no state (pure helpers, interface stubs) and trivial getters/setters are excluded so plain data carriers and idiomatic Go helpers don't false-positive; a call to a getter counts as a use of the wrapped field. Included in the default go ruleset.