Next: , Up: Specifying a set of metrics to compute


15.1.3.1 Line Metrics Control

For any (legal) source file, and for each of its eligible local program units, gnatmetric computes the following metrics:

gnatmetric sums the values of the line metrics for all the files being processed and then generates the cumulative results. The tool also computes for all the files being processed the average number of code lines in bodies.

You can use the following switches to select the specific line metrics to be computed and reported.

--lines-all
Report all the line metrics
--no-lines-all
Do not report any of line metrics
--lines
Report the number of all lines
--no-lines
Do not report the number of all lines
--lines-code
Report the number of code lines
--no-lines-code
Do not report the number of code lines
--lines-comment
Report the number of comment lines
--no-lines-comment
Do not report the number of comment lines
--lines-eol-comment
Report the number of code lines containing end-of-line comments
--no-lines-eol-comment
Do not report the number of code lines containing end-of-line comments
--lines-ratio
Report the comment percentage in the program text
--no-lines-ratio
Do not report the comment percentage in the program text
--lines-blank
Report the number of blank lines
--no-lines-blank
Do not report the number of blank lines
--lines-average
Report the average number of code lines in subprogram bodies, task bodies, entry bodies and statement sequences in package bodies. The metric is computed and reported for the whole set of processed Ada sources only.
--no-lines-average
Do not report the average number of code lines in subprogram bodies, task bodies, entry bodies and statement sequences in package bodies.