Implement efferent coupling at module level#790
Merged
mcserep merged 5 commits intoEricsson:masterfrom May 5, 2025
Merged
Conversation
added 5 commits
April 9, 2025 18:03
By default, ODB uses left join instead of inner join causing incorrect metrics values.
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR fixes a bug in the efferent coupling type level calculation while introducing new metrics for type dependencies and module-level efferent coupling. Key changes include:
- Fixing the bug caused by the use of a left join in efferent coupling type level calculation.
- Adding the CppTypeDependencyMetrics table and updating the efferent type level calculation to record dependency relations.
- Implementing efferent coupling module level calculations and associated test cases.
Reviewed Changes
Copilot reviewed 14 out of 17 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| util/include/util/dbutil.h | Refactored getFilterPathsQuery to use an if constexpr lambda for determining the query column. |
| plugins/cpp_metrics/test/src/cppmetricsparsertest.cpp | Updated test parameter typedefs and instantiations for consistency. |
| plugins/cpp_metrics/parser/src/cppmetricsparser.cpp | Updated inheritance query logic and added module level metric calculations. |
| plugins/cpp_metrics/parser/include/cppmetricsparser/cppmetricsparser.h | Added declarations for new module coupling methods and constants. |
| Various files in plugins/cpp_metrics/test/sources/parser/* and plugins/cpp_metrics/model/include/model/* | Added new module metric sources and updated model definitions to support efferent module metrics. |
| plugins/cpp/model/include/model/cppfunction.h | Updated db view syntax for parameter and local variable views using the new inner alias. |
Files not reviewed (3)
- plugins/cpp_metrics/model/CMakeLists.txt: Language not supported
- plugins/cpp_metrics/test/sources/parser/CMakeLists.txt: Language not supported
- util/CMakeLists.txt: Language not supported
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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: #674
CppTypeDependencyMetricstable listing dependencies between individual types