Commit 4ae83b58 by Bob Duff Committed by Pierre-Marie de Rodat

[Ada] Fix inconsistent documentation for gnatmetric

One part said all metrics are enabled by default (which is now true),
and another part said the coupling metrics are disabled by default
(which is no longer true).

2019-07-11  Bob Duff  <duff@adacore.com>

gcc/ada/

	* doc/gnat_ugn/gnat_utility_programs.rst: Fix inconsistent
	documentation for gnatmetric.
	* gnat_ugn.texi: Regenerate.

From-SVN: r273391
parent 852c41d4
2019-07-11 Bob Duff <duff@adacore.com>
* doc/gnat_ugn/gnat_utility_programs.rst: Fix inconsistent
documentation for gnatmetric.
* gnat_ugn.texi: Regenerate.
2019-07-11 Bob Duff <duff@adacore.com>
* doc/gnat_ugn/gnat_utility_programs.rst: Document gnatpp's
--spaces-only switch.
......
......@@ -1804,7 +1804,7 @@ Alternatively, you may run the script using the following command line:
for computing various program metrics.
It takes an Ada source file as input and generates a file containing the
metrics data as output. Various switches control which
metrics are computed and output.
metrics are reported.
``gnatmetric`` is a project-aware tool
(see :ref:`Using_Project_Files_with_GNAT_Tools` for a description of
......@@ -1980,12 +1980,11 @@ Alternatively, you may run the script using the following command line:
Specifying a set of metrics to compute
--------------------------------------
By default all the metrics are computed and reported. The switches
described in this subsection allow you to control, on an individual
basis, whether metrics are computed and reported. If at least one
positive metric switch is specified (that is, a switch that defines
that a given metric or set of metrics is to be computed), then only
explicitly specified metrics are reported.
By default all the metrics are reported. The switches described in this
subsection allow you to control, on an individual basis, whether metrics are
reported. If at least one positive metric switch is specified (that is, a
switch that defines that a given metric or set of metrics is to be computed),
then only explicitly specified metrics are reported.
.. _Line_Metrics_Control:
......@@ -2023,7 +2022,7 @@ Alternatively, you may run the script using the following command line:
code lines in bodies.
You can use the following switches to select the specific line metrics
to be computed and reported.
to be reported.
.. index:: --lines (gnatmetric)
......@@ -2089,10 +2088,9 @@ Alternatively, you may run the script using the following command line:
:switch:`--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.
Report the average number of code lines in subprogram bodies, task bodies,
entry bodies and statement sequences in package bodies. The metric is
reported for the whole set of processed Ada sources only.
:switch:`--no-lines-average`
......@@ -2197,10 +2195,10 @@ Alternatively, you may run the script using the following command line:
declaration are counted as one type declaration. Incomplete type
declarations and generic formal types are not counted.
No distinction is made among different kinds of types (abstract,
private etc.); the total number of types is computed and reported.
private etc.); the total number of types is reported.
By default, all the syntax metrics are computed and reported. You can
use the following switches to select specific syntax metrics.
By default, all the syntax metrics are reported. You can use the following
switches to select specific syntax metrics.
.. index:: --syntax (gnatmetric)
......@@ -2364,9 +2362,8 @@ Alternatively, you may run the script using the following command line:
code of assertions and predicates (that is, subprogram preconditions and
postconditions, subtype predicates and type invariants) is also skipped.
By default, all the complexity metrics are computed and reported.
For more fine-grained control you can use
the following switches:
By default, all the complexity metrics are reported. For more fine-grained
control you can use the following switches:
.. index:: --complexity (gnatmetric)
......@@ -2408,8 +2405,7 @@ Alternatively, you may run the script using the following command line:
:switch:`--complexity-average`
Report the average McCabe Cyclomatic Complexity for all the subprogram bodies,
task bodies, entry bodies and statement sequences in package bodies.
The metric is computed and reported for whole set of processed Ada sources
only.
The metric is reported for whole set of processed Ada sources only.
:switch:`--no-complexity-average`
......@@ -2623,8 +2619,8 @@ Alternatively, you may run the script using the following command line:
by invoking ``gnatmetric`` with the corresponding project file
and with the :switch:`-U` option.
By default, all the coupling metrics are disabled. You can use the following
switches to specify the coupling metrics to be computed and reported:
By default, all the coupling metrics are reported. You can use the following
switches to select specific syntax metrics.
.. index:: --tagged-coupling (gnatmetric)
.. index:: --hierarchy-coupling (gnatmetric)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment