-
Notifications
You must be signed in to change notification settings - Fork 113
Implement relational cohesion metric #795
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement relational cohesion metric #795
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR implements a relational cohesion metric for C++ modules to enhance code quality analysis and closes issue #680.
- Adds a new test suite for relational cohesion (ParameterizedRelationalCohesionTest) with corresponding sample modules in rc_module_a, rc_module_b, and rc_module_c.
- Implements the relational cohesion metric calculation in the metrics parser and updates the relevant data models and views.
- Updates the parser header and database model files to support the new metric.
Reviewed Changes
Copilot reviewed 15 out of 15 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| plugins/cpp_metrics/test/src/cppmetricsparsertest.cpp | Adds tests to verify relational cohesion metric behavior. |
| plugins/cpp_metrics/test/sources/parser/rc_module_* | Introduces sample modules to simulate internal type relationships. |
| plugins/cpp_metrics/parser/src/cppmetricsparser.cpp | Implements relational cohesion metric computation using a new function. |
| plugins/cpp_metrics/parser/include/cppmetricsparser/cppmetricsparser.h | Declares the new relational cohesion method and its partition multiplier. |
| plugins/cpp_metrics/model/include/model/cpptypedependencymetrics.h | Adds a new DB view for counting type dependencies for the metric. |
| plugins/cpp_metrics/model/include/model/cppfilemetrics.h | Updates the file metrics type and value to support double values for the metric. |
| plugins/cpp_metrics/model/include/model/cppcohesionmetrics.h | Adds a new DB view to support cohesion metric counting. |
mcserep
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CppMetricsServiceHandler::getCppModuleMetricsTypeNames() should be extended with the new module metrics.
f0ffbc7 to
f6b46a7
Compare
Fixed in f6b46a7. |
Closes #680