-
Notifications
You must be signed in to change notification settings - Fork 113
Implement afferent coupling at module level #794
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
Merged
mcserep
merged 2 commits into
Ericsson:master
from
barnabasdomozi:afferent_coupling_modules
May 27, 2025
Merged
Implement afferent coupling at module level #794
mcserep
merged 2 commits into
Ericsson:master
from
barnabasdomozi:afferent_coupling_modules
May 27, 2025
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
d385eeb to
ff35a5e
Compare
ff35a5e to
606d9b9
Compare
Contributor
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
Adds computation and testing for afferent coupling metrics at the module level.
- Introduces
afferentModuleLevel()in the parser and hooks it intoparse() - Defines a new DB view/struct for distinct entity counts and updates the
CppFileMetrics::Typeenum - Adds end-to-end tests and test fixtures for afferent module coupling, including new test sources
Reviewed Changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| plugins/cpp_metrics/test/src/cppmetricsparsertest.cpp | Add ParameterizedAfferentModuleCouplingTest suite and update efferent test comments |
| plugins/cpp_metrics/test/sources/parser/modulemetrics.cpp | Include new module_d/d1.h in module metrics input |
| plugins/cpp_metrics/test/sources/parser/module_d/d1.h | New test class D1 with dependencies on C1 and C2 |
| plugins/cpp_metrics/parser/src/cppmetricsparser.cpp | Implement afferentModuleLevel(), register it in parse() |
| plugins/cpp_metrics/parser/include/cppmetricsparser/cppmetricsparser.h | Declare afferentModuleLevel() and its partition multiplier |
| plugins/cpp_metrics/model/include/model/cpptypedependencymetrics.h | Rename efferent count struct and add afferent count view/struct |
| plugins/cpp_metrics/model/include/model/cppfilemetrics.h | Add AFFERENT_MODULE to CppFileMetrics::Type |
Comments suppressed due to low confidence (1)
plugins/cpp_metrics/test/src/cppmetricsparsertest.cpp:386
- [nitpick] The test suite prefix
ParameterizedAfferentModuleCouplingTestSuiteis inconsistent with the efferent suite naming. Consider usingParameterizedAfferentModuleCouplingTestfor consistency.
INSTANTIATE_TEST_SUITE_P(ParameterizedAfferentModuleCouplingTestSuite,
mcserep
approved these changes
May 27, 2025
Collaborator
Author
Collaborator
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Kind: Enhancement 🌟
Kind: Important 🥇
Plugin: C++
Issues related to the parsing and presentation of C++ projects.
Plugin: Metrics
Issues related to the code metrics plugin.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Closes #672