Skip to content
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

Update C++ metrics service with our new metrics #748

Merged
merged 1 commit into from
May 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions plugins/cpp_metrics/service/cxxmetrics.thrift
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,9 @@ enum CppAstNodeMetricsType
{
ParameterCount = 1,
McCabe = 2,
LackOfCohesion = 3,
LackOfCohesionHS = 4
BumpyRoad = 3,
LackOfCohesion = 4,
LackOfCohesionHS = 5,
}

enum CppModuleMetricsType
Expand Down
10 changes: 7 additions & 3 deletions plugins/cpp_metrics/service/src/cppmetricsservice.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,19 @@ void CppMetricsServiceHandler::getCppAstNodeMetricsTypeNames(
_return.push_back(typeName);

typeName.type = CppAstNodeMetricsType::McCabe;
typeName.name = "McCabe metric";
typeName.name = "Cyclomatic (McCabe) complexity of function";
_return.push_back(typeName);

typeName.type = CppAstNodeMetricsType::BumpyRoad;
typeName.name = "Bumpy road complexity of function";
_return.push_back(typeName);

typeName.type = CppAstNodeMetricsType::LackOfCohesion;
typeName.name = "Lack of cohesion of function";
typeName.name = "Lack of cohesion of type";
_return.push_back(typeName);

typeName.type = CppAstNodeMetricsType::LackOfCohesionHS;
typeName.name = "Lack of cohesion of function (Henderson-Sellers variant)";
typeName.name = "Lack of cohesion of type (Henderson-Sellers variant)";
_return.push_back(typeName);
}

Expand Down
Loading