Open mcserep opened 1 year ago
What do we consider a module in this case? An entire directory? So, for example, in CodeCompass, the plugins, parser and model directories are 3 different modules?
Another option is to consider the C++20 feature module
but I guess it's not that widespread.
What do we consider a module in this case? An entire directory? So, for example, in CodeCompass, the plugins, parser and model directories are 3 different modules?
Another option is to consider the C++20 feature
module
but I guess it's not that widespread.
A module is an abstract concept here. In case of CodeCompass parser
is a module, but plugins
is not a module, instead plugins/cpp
is a module, as that is a cohesive logical unit of the program. But plugins/cpp/parser
could also be considered a submodule in my view.
I see the following options:
plugins
, plugins/cpp
, plugincs/cpp/parser
and plugincs/cpp/parser/src
could all be interpreted as modules. In this case we evaluate the module level metric for all directories, but it won't make sense for all directories. It will depend on the user to query the metric for the directories, where it is useful. I see this as a possible option.I will further discuss this question with @zporky today.
@intjftw Update: last week we discussed with @zporky on the weekly meeting, that each directory should be considered as a module. Later maybe it would be wise to require some input (a whitelist) about which directories are interesting, so we do not calculate these metrics for directories, where it does not make sense, but for now, we roll with this approach.
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 module is the number of types inside this module that depends on types outside this module.
High efferent coupling indicates that the concerned module is dependant.