You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The per function metrics in the detailed report of a module are shown as infinity.
This is due to the initialization of nof to zero in the cccc_html.cc file.
--- old/cccc_htm.cc 2017-04-03 09:16:56.993686941 +0200+++ new/cccc_htm.cc 2017-04-03 09:56:09.030666528 +0200@@ -1221,7 +1221,6 @@
{
// calculate the counts on which all displayed data will be based
// int nof=module_ptr->member_table.records(); // Number of functions
- int nof=0;
int loc=module_ptr->get_count("LOC"); // lines of code
int mvg=module_ptr->get_count("MVG"); // McCabes cyclomatic complexity
int com=module_ptr->get_count("COM"); // lines of comment
@@ -1237,6 +1236,10 @@
int noc=module_ptr->get_count("NOC"); // number of children
int cbo=module_ptr->get_count("CBO"); // coupling between objects
+ // To calculate the per function metrics in the detailed report the+ // number of functions is set to the weighted methods + int nof=wmc1;+
fstr << "<TABLE BORDER WIDTH=100%>" << endl
<< "<TR>" << endl;
Put_Header_Cell("Metric",70);
After applying the patch the values per function are calculated as expected:
The text was updated successfully, but these errors were encountered:
The per function metrics in the detailed report of a module are shown as infinity.
This is due to the initialization of
nof
to zero in thecccc_html.cc
file.After applying the patch the values per function are calculated as expected:
The text was updated successfully, but these errors were encountered: