Ericsson / CodeCompass

CodeCompass is a software comprehension tool for large scale software written in C/C++ and Java
https://codecompass.net
GNU General Public License v3.0
496 stars 96 forks source link

Efferent Coupling at Type Level for C++ #673

Open mcserep opened 7 months ago

mcserep commented 7 months ago

Coupling is metric which can be computed for structural units at different levels (e.g. classes, namespaces, modules). It measures how many other entities an entity depends on; and how many dependants it has.

The Efferent Coupling for a particular type is the number of types it directly depends on. Types declared in framework projects are also taken into account.

CppDepend's recommendation is that types where efferent coupling value is larger than 50, are types that depends on too many other types. They are complex and have more than one responsibility. They are good candidate for refactoring.