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

**URL:** <https://discourse.openrobotics.org/t/what-quality-metrics-do-we-need-to-make-packages-quality-visible/3985>\
**Category:** Quality Assurance\
**Created:** [February 15, 2018, 4:15pm UTC](https://discourse.openrobotics.org/t/what-quality-metrics-do-we-need-to-make-packages-quality-visible/3985 "2018-02-15T16:15:10Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![fkromer](https://sea2.discourse-cdn.com/flex022/user_avatar/discourse.openrobotics.org/fkromer/32/2446_2.png) [@fkromer](https://discourse.openrobotics.org/u/fkromer)\
**Post date:** [February 18, 2018, 5:38pm UTC](https://discourse.openrobotics.org/t/what-quality-metrics-do-we-need-to-make-packages-quality-visible/3985/3 "2018-02-18T17:38:18Z")

</div>

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](https://github.com/rakhimov/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](https://github.com/terryyin/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](https://www.cppdepend.com/metrics#EfferentCoupling). 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](https://www.cppdepend.com/metrics#AfferentCoupling). I don’t know if there are free tools which are capable of reporting this metric.

---

_[View the full topic](https://discourse.openrobotics.org/t/what-quality-metrics-do-we-need-to-make-packages-quality-visible/3985)._
