Number of Lines Without Comment
Number of lines of code excluding blank lines and comment-only lines
Description
Note
Use Bug Finder instead of Code Prover for computing code metrics. Support for computing code metrics in Code Prover will be removed in a future release. See Version History.
The number of lines without comment is given by
Number of lines without comment = NT - (NB + NC
),
NT is the total number of lines.
NB is the number of blank lines.
NC is the number of comment-only lines.
Lines of code that contain inline comments are considered executable lines of code and are excluded from NC when calculating this metric.
Polyspace® calculates this metric for source files and header files in the same folders as source files. Use one of these options to specify other behavior:
To report the metric for other header files, change the default value of the option
Generate results for sources and (-generate-results-for)
.To not report the metric for header files at all, change the value of the option
Do not generate results for (-do-not-generate-results-for)
toall-headers
.
Examples
Metric Information
Group: File |
Acronym: LINES_WITHOUT_CMT |
HIS Metric: No |