Skip to content

Conversation

@barnabasdomozi
Copy link
Collaborator

Closes #672

@barnabasdomozi barnabasdomozi force-pushed the afferent_coupling_modules branch from d385eeb to ff35a5e Compare May 7, 2025 21:22
@barnabasdomozi barnabasdomozi force-pushed the afferent_coupling_modules branch from ff35a5e to 606d9b9 Compare May 7, 2025 21:55
@mcserep mcserep added 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. labels May 27, 2025
@mcserep mcserep requested review from Copilot and mcserep May 27, 2025 03:11
@mcserep mcserep added this to the Upcoming Release milestone May 27, 2025
Copy link
Contributor

Copilot AI left a 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 into parse()
  • Defines a new DB view/struct for distinct entity counts and updates the CppFileMetrics::Type enum
  • 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 ParameterizedAfferentModuleCouplingTestSuite is inconsistent with the efferent suite naming. Consider using ParameterizedAfferentModuleCouplingTest for consistency.
INSTANTIATE_TEST_SUITE_P(ParameterizedAfferentModuleCouplingTestSuite,

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@mcserep mcserep merged commit dc03735 into Ericsson:master May 27, 2025
5 of 6 checks passed
@barnabasdomozi
Copy link
Collaborator Author

@mcserep
The comment changed in c142f61 is not a typo,
afferentModuleLevel depends on efferentTypeLevel.

@mcserep
Copy link
Collaborator

mcserep commented Jun 9, 2025

@mcserep The comment changed in c142f61 is not a typo, afferentModuleLevel depends on efferentTypeLevel.

I see now. I have updated the comment in 72f069f.

@barnabasdomozi barnabasdomozi deleted the afferent_coupling_modules branch July 30, 2025 13:27
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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Afferent Coupling at Module Level for C++

2 participants