.\" Man page for gnatmetric. .\" .\" Copyright (C) 2006 Ludovic Brenta .\" Copyright (C) 2014 Nicolas Boulenguez .\" .\" This is free software; you can redistribute it and/or modify it under .\" the terms of the GNU General Public License as published by the Free .\" Software Foundation; either version 3, or (at your option) any later .\" version. .\" .\" This is distributed in the hope that it will be useful, but WITHOUT .\" ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or .\" FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License .\" for more details. .\" .\" You should have received a copy of the GNU General Public License .\" along with this page, in /usr/share/common-licenses/GPL-3. If not, \" see . .\" .TH "GNATMETRIC" 1 "2014-08-09" "Debian GNU/Linux" "ASIS Tools" .\"---------------------------------------------------------------------- .SH NAME gnatmetric \- Ada metrics tool .\"---------------------------------------------------------------------- .SH SYNOPSIS \fBgnatmetric\fR [\fIoptions\fR] {\fIfilename\fR | \fB\-files\fR \fIfilename\fR} [\fIgcc_switches\fR] .\"---------------------------------------------------------------------- .SH DESCRIPTION \fBgnatmetric\fR 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 \fB\-files\fR option. .P Documentation about the ASIS tools may be found in \fI/usr/share/doc/asis\-doc/\fR if the \fBasis\-doc\fR package is installed. .\"---------------------------------------------------------------------- .SH OPTIONS .IP \fB\-v\fR verbose mode .IP \fB\-q\fR quiet mode .IP \fB\-dv\fR generate debug output .IP \fB\-dd\fR generate string to be used as input for progress indicator .IP \fB\-nocc\fR do not compute the McCabe Cyclomatic Complexity .IP \fB\-noec\fR do not compute the Essential Complexity .IP \fB\-nonl\fR do not compute maximal loop nesting level .IP \fB\-ne\fR do not consider exit statements as gotos when computing Essential Complexity .IP \fB\-nolocal\fR do not compute detailed metrics for local program units .SS Line metrics When not specified explicitly, all line metrics are set on, otherwise only specified metrics are computed: .IP \fB\-la\fR the number of all lines .IP \fB\-lcode\fR the number of code lines .IP \fB\-lcomm\fR the number of comment lines .IP \fB\-leol\fR the number of code lines also containing comments .IP \fB\-lb\fR the number of blank lines .SS Element metrics When not specified explicitly, all element metrics are set on, otherwise only specified metrics are computed: .IP \fB\-ed\fR the total number of declarations .IP \fB\-es\fR the total number of statements .IP \fB\-eps\fR the number of public subprograms in a compilation unit .IP \fB\-eas\fR the number of all the subprograms in a compilation unit .IP \fB\-ept\fR the number of public types in a compilation unit .IP \fB\-eat\fR the number of all the types in a compilation unit .IP \fB\-enu\fR the maximal program unit nesting level .IP \fB\-ec\fR the maximal construct nesting level .SS Output file control .IP "\fB\-d\fR \fIdirname\fR" put files with detailed metrics into \fIdirname\fR .IP \fB\-x\fR generate the XML output .IP \fB\-nt\fR do not generate the output in text form, implies '\-x' .IP "\fB\-o\fR \fIfile\-suffix\fR" the suffix for the file to put the detailed metrics for a source file (\fIfile\-suffix\fR should begin with a dot) .IP "\fB\-og\fR \fIfilename\fR" the name of the file to put the global metrics info into (if not set, this info is sent to Stdout) .IP "\fB\-ox\fR \fIfilename\fR" the name of the file to put the XML output into, implies '\-x' .IP \fB\-sfn\fR use short source file name in the output .SS Input files .IP \fIfilename\fR the name of the Ada source file for which metrics should be computed. Wildcards are allowed. .IP "\fB\-files\fR \fIfilename\fR" the name of the text file containing a list of Ada source files for which metrics should be computed. .SS GCC switches .IP \fIgcc_switches\fR Passed to gnatgcc as "\fB\-cargs\fR \fIgcc_switches\fR". .\"---------------------------------------------------------------------- .SH SEE ALSO gnat(1), asistant(1), gnat2xml(1), gnatcheck(1), gnatelim(1), gnatpp(1), gnatstub(1), gnattest(1) .P Documentation about the ASIS tools may be found in \fI/usr/share/doc/asis\-doc/\fR if the \fBasis\-doc\fR package is installed. .\" The reference documentation about ASIS is excluded due to license problems, but may be found in various formats at \fIhttp://libre.adacore.com/developers/documentation\fR.