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
When the output is generated with -wide the Complexity/Lines is calculated. This is okay for one or multiple files. But then the Complexity/Lines is accumulated to sum up to the language Complexity/Lines. But this is not correct.
The error is also produced when run without --by-file
Expected behavior
The Complexity/Lines should not be added from each file to produce the language-Complexity/Lines. Instead, it should be calculated on the summed up language Complexity and Lines. In the above example, the correct Complexity/Lines for C Header would be:
Alternatively: if the described output is by design, the headline Complexity/Lines is wrong for the language and total results. But I could not find any description on the reason why the sum of the file Complexity/Lines is equivalent to the language or total Complexity/Lines.
One more thing: It would be nice to have the option to sort the files by Complexity/Lines. Current options are:
-s, --sort string column to sort by [files, name, lines, blanks, code, comments, complexity] (default "files")
Desktop:
OS: Windows 10 LTSB 1607
Version: scc version 3.1.0
The text was updated successfully, but these errors were encountered:
Describe the bug
When the output is generated with
-wide
theComplexity/Lines
is calculated. This is okay for one or multiple files. But then theComplexity/Lines
is accumulated to sum up to the languageComplexity/Lines
. But this is not correct.Example:
The language result seems to be calculated like this:
The problem even extends to the total calculation:
To Reproduce
scc.exe --no-cocomo --no-size --sort complexity --wide header_file_1.h header_file_2.h header_file_3.h
The error is also produced when run without
--by-file
Expected behavior
The
Complexity/Lines
should not be added from each file to produce the language-Complexity/Lines
. Instead, it should be calculated on the summed up language Complexity and Lines. In the above example, the correctComplexity/Lines
for C Header would be:And for the total result:
Alternatively: if the described output is by design, the headline
Complexity/Lines
is wrong for the language and total results. But I could not find any description on the reason why the sum of the fileComplexity/Lines
is equivalent to the language or totalComplexity/Lines
.One more thing: It would be nice to have the option to sort the files by
Complexity/Lines
. Current options are:Desktop:
The text was updated successfully, but these errors were encountered: