Static metrics

Static Metrics for C, C++ and Ada

The Source Code Parsers provide static metrics for the analyzed C and C++ source code.

File Level Metrics

The scope of the metrics report depends on the selection made in the Report Explorer window. This can be a file, one or several classes or any other set of source code components.

  • Comment only lines: the number of comment lines that do not contain any source code

  • Comments: the total number of comment lines

  • Empty lines: the number of lines with no content

  • Source only lines: the number of lines of code that do not contain any comments

  • Source and comment lines: the number of lines containing both source code and comments

  • Lines: the number of lines in the source file

  • Comment rate: percentage of comment lines against the total number of lines

  • Source lines: total number of lines of source code

File, Class or Package, and Root Level Metrics

These numbers are the sum of metrics measured for all the components of a given file, class or package.

  • Total statements: total number of statement in child nodes

  • Maximum statements: the maximum number of statements

  • Maximum level: the maximum nesting level

  • Maximum V(g): the highest encountered cyclomatic number

  • Mean V(g): the average cyclomatic number

  • Standard deviation from V(g): deviation from the average V(g)

  • Sum of V(g): total V(g) for the scope.