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
516 stars 101 forks source link

Added calculation for relational cohesion metric #747

Open kmkristof opened 4 months ago

kmkristof commented 4 months ago

Closes #680

Added -m flag to the parser which can be used to specify modules. The user is expected to input a path to a file in which the paths to the modules are listed. If no modules are specified the default behaviour is to treat every directory under the input paths as a module.

mcserep commented 3 months ago

@kmkristof The PR was marked ready, but the description says the tests are still missing. (And there are indeed no tests in the changeset.) Please add the missing unit tests.

mcserep commented 2 months ago

@kmkristof The PR contains various commits unrelated to this PR for some reason. This makes it hard to review the PR.
Please rebase your branch onto master and force push it.

kmkristof commented 2 months ago

@mcserep I added the necessary data and definitions for unit testing however i ran into a problem. For example when looking at _plugins/cppmetrics/test/sources/parser/RelationalCohesion/MultipleTypesInModuleWithRelations/RelationByFunctionParameter/relatedByFPA no typeHash is generated for the class itself (as it doesn't become a CppTypedEntity). This means that when i find a reference to this type i cannot connect it to the definition. How do you suggest i solve this issue?