Scroll to navigation

GNATMETRIC(1) ASIS Tools GNATMETRIC(1)

NAME

gnatmetric - Ada metrics tool

SYNOPSIS

gnatmetric [options] {filename | -files filename} [gcc_switches]

DESCRIPTION

gnatmetric takes a set of compilable Ada sources as input, computes for them various programming metrics and generates the output. Argument Ada sources may be provided as command line arguments, or you can place the names of the Ada sources to compute the metrics for into a textual file and to provide the name of this file as the parameter of -files option.

Documentation about the ASIS tools may be found in /usr/share/doc/asis-doc/ if the asis-doc package is installed.

OPTIONS

verbose mode
quiet mode
generate debug output
generate string to be used as input for progress indicator
do not compute the McCabe Cyclomatic Complexity
do not compute the Essential Complexity
do not compute maximal loop nesting level
do not consider exit statements as gotos when computing Essential Complexity
do not compute detailed metrics for local program units

Line metrics

When not specified explicitly, all line metrics are set on, otherwise only specified metrics are computed:

the number of all lines
the number of code lines
the number of comment lines
the number of code lines also containing comments
the number of blank lines

Element metrics

When not specified explicitly, all element metrics are set on, otherwise only specified metrics are computed:

the total number of declarations
the total number of statements
the number of public subprograms in a compilation unit
the number of all the subprograms in a compilation unit
the number of public types in a compilation unit
the number of all the types in a compilation unit
the maximal program unit nesting level
the maximal construct nesting level

Output file control

put files with detailed metrics into dirname
generate the XML output
do not generate the output in text form, implies '-x'
the suffix for the file to put the detailed metrics for a source file (file-suffix should begin with a dot)
the name of the file to put the global metrics info into (if not set, this info is sent to Stdout)
the name of the file to put the XML output into, implies '-x'
use short source file name in the output

Input files

the name of the Ada source file for which metrics should be computed. Wildcards are allowed.
the name of the text file containing a list of Ada source files for which metrics should be computed.

GCC switches

Passed to gnatgcc as "-cargs gcc_switches".

SEE ALSO

gnat(1), asistant(1), gnat2xml(1), gnatcheck(1), gnatelim(1), gnatpp(1), gnatstub(1), gnattest(1)

Documentation about the ASIS tools may be found in /usr/share/doc/asis-doc/ if the asis-doc package is installed. The reference documentation about ASIS is excluded due to license problems, but may be found in various formats at http://libre.adacore.com/developers/documentation.

2014-08-09 Debian GNU/Linux