What quality metrics do we need to make packages quality visible?

To ensure testability of C++ packages (also if there are no tests yet but shall be added in the future) the following metrics could be added to the static analysis list:

  • Cyclic includes: Can limit (white box) testing of packages. Can be checked with cppdep (static analysis).
  • McCabe complexity (often called differently): Can make (white box) testing of packages practically impossible. Some standards recommend not to raise the upper threshold value of 15. Can be checked e.g. with lizard.
  • Efferent coupling (on various levels of abstraction): Describes the degree of dependency of an entity under analyzation on other entities (e.g. on the class level: on which/how much other classes does the class under analyzation depend on). Further info here. I don’t know if there are free tools which are capable of reporting this metric.
  • Afferent coupling (on various levels of abstraction): Describes the degree of dependency of other entities on the entity under analyzation (e.g. on the class level: which/how much other classes depend on the class under analyzation). Further info here. I don’t know if there are free tools which are capable of reporting this metric.
1 Like