Commit 7954ad60 by Sergey Rybin Committed by Arnaud Charlet

vms_data.ads: Revise gnatmetric qualifiers.

2007-09-26  Sergey Rybin  <rybin@adacore.com>

	* vms_data.ads: Revise gnatmetric qualifiers.
	Add qualified for the new gnatbind option '-y'

	* gnat_ugn.texi: Revise the gnatmetric section.
	Add entry for new gnatbind option '-y'.

	* gnat_rm.texi: Minor spelling correction.
	Document restriction on overlaying controlled types

From-SVN: r128808
parent d031ecc4
...@@ -4957,7 +4957,7 @@ a generic unit that can be instantiated with either enumeration types ...@@ -4957,7 +4957,7 @@ a generic unit that can be instantiated with either enumeration types
or integer types. Note that if @code{Enum_Rep} is used on a modular or integer types. Note that if @code{Enum_Rep} is used on a modular
type whose upper bound exceeds the upper bound of the largest signed type whose upper bound exceeds the upper bound of the largest signed
integer type, and the argument is a variable, so that the universal integer type, and the argument is a variable, so that the universal
integer calculation is done at run-time, then the call to @code{Enum_Rep} integer calculation is done at run time, then the call to @code{Enum_Rep}
may raise @code{Constraint_Error}. may raise @code{Constraint_Error}.
@node Epsilon @node Epsilon
...@@ -10551,6 +10551,11 @@ check is suppressed if range checks are suppressed, or if the special GNAT ...@@ -10551,6 +10551,11 @@ check is suppressed if range checks are suppressed, or if the special GNAT
check Alignment_Check is suppressed, or if check Alignment_Check is suppressed, or if
@code{pragma Restrictions (No_Elaboration_Code)} is in effect. @code{pragma Restrictions (No_Elaboration_Code)} is in effect.
Finally, GNAT does not permit overlaying of objects of controlled types or
composite types containing a controlled component. In most cases, the compiler
can detect an attempt at such overlays and will generate a warning at compile
time and a Program_Error exception at run time.
@findex Export @findex Export
An address clause cannot be given for an exported object. More An address clause cannot be given for an exported object. More
understandably the real restriction is that objects with an address understandably the real restriction is that objects with an address
...@@ -13868,7 +13873,7 @@ with @code{GLADE}. ...@@ -13868,7 +13873,7 @@ with @code{GLADE}.
@cindex Run-time restrictions access @cindex Run-time restrictions access
@noindent @noindent
This package provides facilities for accessing at run-time This package provides facilities for accessing at run time
the status of restrictions specified at compile time for the status of restrictions specified at compile time for
the partition. Information is available both with regard the partition. Information is available both with regard
to actual restrictions specified, and with regard to to actual restrictions specified, and with regard to
......
...@@ -7659,6 +7659,10 @@ Default mode, in which sources are checked for consistency only if ...@@ -7659,6 +7659,10 @@ Default mode, in which sources are checked for consistency only if
they are available. they are available.
@end ifset @end ifset
@item ^-y^/ENABLE_LEAP_SECONDS^
@cindex @option{^-y^/ENABLE_LEAP_SECONDS^} (@code{gnatbind})
Enable leap seconds support in @code{Ada.Calendar} and its children.
@item ^-z^/ZERO_MAIN^ @item ^-z^/ZERO_MAIN^
@cindex @option{^-z^/ZERO_MAIN^} (@code{gnatbind}) @cindex @option{^-z^/ZERO_MAIN^} (@code{gnatbind})
No main subprogram. No main subprogram.
...@@ -16293,9 +16297,7 @@ The following subsections describe the various switches accepted by ...@@ -16293,9 +16297,7 @@ The following subsections describe the various switches accepted by
@menu @menu
* Output Files Control:: * Output Files Control::
* Disable Metrics For Local Units:: * Disable Metrics For Local Units::
* Line Metrics Control:: * Specifying a set of metrics to compute::
* Syntax Metrics Control::
* Complexity Metrics Control::
* Other gnatmetric Switches:: * Other gnatmetric Switches::
* Generate project-wide metrics:: * Generate project-wide metrics::
@end menu @end menu
...@@ -16311,9 +16313,11 @@ output is generated. ...@@ -16311,9 +16313,11 @@ output is generated.
When generating the output in textual form, @command{gnatmetric} creates When generating the output in textual form, @command{gnatmetric} creates
for each Ada source file a corresponding text file for each Ada source file a corresponding text file
containing the computed metrics. By default, this file containing the computed metrics, except for the case when the set of metrics
is placed in the same directory as where the source file is located, and specified by gnatmetric parameters consists only of metrics that are computed
its name is obtained for the whole set of analyzed sources, but not for each Ada source.
By default, this file is placed in the same directory as where the source
file is located, and its name is obtained
by appending the ^@file{.metrix}^@file{$METRIX}^ suffix to the name of the by appending the ^@file{.metrix}^@file{$METRIX}^ suffix to the name of the
input file. input file.
...@@ -16413,8 +16417,26 @@ Do not compute detailed metrics for eligible local program units ...@@ -16413,8 +16417,26 @@ Do not compute detailed metrics for eligible local program units
@end table @end table
@node Specifying a set of metrics to compute
@subsection Specifying a set of metrics to compute
@noindent
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.
@menu
* Line Metrics Control::
* Syntax Metrics Control::
* Complexity Metrics Control::
@end menu
@node Line Metrics Control @node Line Metrics Control
@subsection Line Metrics Control @subsubsection Line Metrics Control
@cindex Line metrics control in @command{gnatmetric} @cindex Line metrics control in @command{gnatmetric}
@noindent @noindent
...@@ -16436,54 +16458,93 @@ the number of comment lines ...@@ -16436,54 +16458,93 @@ the number of comment lines
the number of code lines containing end-of-line comments; the number of code lines containing end-of-line comments;
@item @item
the ratio between the number of lines that contain comments and the number of all the comment percentage: the ratio between the number of lines that contain
the non-blank lines expressed in percentages (the comment percentage); comments and the number of all non-blank lines, expressed as a percentage;
@item @item
the number of empty lines and lines containing only space characters and/or the number of empty lines and lines containing only space characters and/or
format effectors (blank lines) format effectors (blank lines)
@item
the average number of code lines in subprogram bodies, task bodies, entry
bodies and statement sequences in package bodies (this metric is only computed
across the whole set of the analyzed units)
@end itemize @end itemize
If @command{gnatmetric} is invoked on more than one source file, it sums the @noindent
values of the line metrics for all the files being processed and then @command{gnatmetric} sums the values of the line metrics for all the
generates the cumulative results. 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.
By default, all the line metrics are computed and reported. You can use the You can use the following switches to select the specific line metrics
following switches to select the specific line metrics to be computed and to be computed and reported.
reported (if any of these parameters is set, only explicitly specified line
metrics are computed).
@table @option @table @option
@cindex @option{^-la^/LINES_ALL^} (@command{gnatmetric}) @cindex @option{^--lines@var{x}^/LINE_COUNT_METRICS^} (@command{gnatmetric})
@item ^-la^/LINES_ALL^
The number of all lines
@cindex @option{^-lcode^/CODE_LINES^} (@command{gnatmetric}) @ifclear vms
@item ^-lcode^/CODE_LINES^ @cindex @option{--no-lines@var{x}}
The number of code lines @end ifclear
@item ^--lines-all^/LINE_COUNT_METRICS=ALL_ON^
Report all the line metrics
@item ^--no-lines-all^/LINE_COUNT_METRICS=ALL_OFF^
Do not report any of line metrics
@item ^--lines^/LINE_COUNT_METRICS=ALL_LINES_ON^
Report the number of all lines
@item ^--no-lines^/LINE_COUNT_METRICS=ALL_LINES_OFF^
Do not report the number of all lines
@item ^--lines-code^/LINE_COUNT_METRICS=CODE_LINES_ON^
Report the number of code lines
@item ^--no-lines-code^/LINE_COUNT_METRICS=CODE_LINES_OFF^
Do not report the number of code lines
@cindex @option{^-lcomm^/COMMENT_LINES^} (@command{gnatmetric}) @item ^--lines-comment^/LINE_COUNT_METRICS=COMMENT_LINES_ON^
@item ^-lcomm^/COMENT_LINES^ Report the number of comment lines
The number of comment lines
@cindex @option{^-leol^/MIXED_CODE_COMMENTS^} (@command{gnatmetric}) @item ^--no-lines-comment^/LINE_COUNT_METRICS=COMMENT_LINES_OFF^
@item ^-leol^/MIXED_CODE_COMMENTS^ Do not report the number of comment lines
The number of code lines containing
@item ^--lines-eol-comment^/LINE_COUNT_METRICS=CODE_COMMENT_LINES_ON^
Report the number of code lines containing
end-of-line comments
@item ^--no-lines-eol-comment^/LINE_COUNT_METRICS=CODE_COMMENT_LINES_OFF^
Do not report the number of code lines containing
end-of-line comments end-of-line comments
@cindex @option{^-ratio^/COMMENT_PERCENTAGE^} (@command{gnatmetric}) @item ^--lines-ratio^/LINE_COUNT_METRICS=COMMENT_PERCENTAGE_ON^
@item ^-ratio^/COMMENT_PERCENTAGE^ Report the comment percentage in the program text
The comment percentage in the program text
@item ^--no-lines-ratio^/LINE_COUNT_METRICS=COMMENT_PERCENTAGE_OFF^
Do not report the comment percentage in the program text
@cindex @option{^-lb^/BLANK_LINES^} (@command{gnatmetric}) @item ^--lines-blank^/LINE_COUNT_METRICS=BLANK_LINES_ON^
@item ^-lb^/BLANK_LINES^ Report the number of blank lines
The number of blank lines
@item ^--no-lines-blank^/LINE_COUNT_METRICS=BLANK_LINES_OFF^
Do not report the number of blank lines
@item ^--lines-average^/LINE_COUNT_METRICS=AVERAGE_BODY_LINES_ON^
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.
@item ^--no-lines-average^/LINE_COUNT_METRICS=AVERAGE_BODY_LINES_OFF^
Do not report the average number of code lines in subprogram bodies,
task bodies, entry bodies and statement sequences in package bodies.
@end table @end table
@node Syntax Metrics Control @node Syntax Metrics Control
@subsection Syntax Metrics Control @subsubsection Syntax Metrics Control
@cindex Syntax metrics control in @command{gnatmetric} @cindex Syntax metrics control in @command{gnatmetric}
@noindent @noindent
...@@ -16515,7 +16576,7 @@ the following metrics: ...@@ -16515,7 +16576,7 @@ the following metrics:
@item Public subprograms @item Public subprograms
This metric is computed for package specifications. It is the This metric is computed for package specifications. It is the
number of subprograms and generic subprograms declared in the visible number of subprograms and generic subprograms declared in the visible
part (including in nested packages, protected objects, and part (including the visible part of nested packages, protected objects, and
protected types). protected types).
@item All subprograms @item All subprograms
...@@ -16531,8 +16592,8 @@ subprograms are counted in the same way as ``usual'' subprogram bodies. ...@@ -16531,8 +16592,8 @@ subprograms are counted in the same way as ``usual'' subprogram bodies.
This metric is computed for package specifications and This metric is computed for package specifications and
generic package declarations. It is the total number of types generic package declarations. It is the total number of types
that can be referenced from outside this compilation unit, plus the that can be referenced from outside this compilation unit, plus the
number of types from all the visible parts of all the visible generic packages. number of types from all the visible parts of all the visible generic
Generic formal types are not counted. Only types, not subtypes, packages. Generic formal types are not counted. Only types, not subtypes,
are included. are included.
@noindent @noindent
...@@ -16571,52 +16632,80 @@ private etc.); the total number of types is computed and reported. ...@@ -16571,52 +16632,80 @@ private etc.); the total number of types is computed and reported.
@noindent @noindent
By default, all the syntax metrics are computed and reported. You can use the By default, all the syntax metrics are computed and reported. You can use the
following switches to select specific syntax metrics; following switches to select specific syntax metrics.
if any of these is set, only the explicitly specified metrics are computed.
@table @option @table @option
@cindex @option{^-ed^/DECLARATION_TOTAL^} (@command{gnatmetric})
@item ^-ed^/DECLARATION_TOTAL^
The total number of declarations
@cindex @option{^-es^/STATEMENT_TOTAL^} (@command{gnatmetric}) @cindex @option{^--syntax@var{x}^/SYNTAX_METRICS^} (@command{gnatmetric})
@item ^-es^/STATEMENT_TOTAL^
The total number of statements
@cindex @option{^-eps^/^} (@command{gnatmetric}) @ifclear vms
@item ^-eps^/INT_SUBPROGRAMS^ @cindex @option{--no-syntax@var{x}}
The number of public subprograms in a compilation unit @end ifclear
@item ^--syntax-all^/SYNTAX_METRICS=ALL_ON^
Report all the syntax metrics
@item ^--no-syntax-all^/ALL_OFF^
Do not report any of syntax metrics
@item ^--declarations^/SYNTAX_METRICS=DECLARATIONS_ON^
Report the total number of declarations
@item ^--no-declarations^/SYNTAX_METRICS=DECLARATIONS_OFF^
Do not report the total number of declarations
@item ^--statements^/SYNTAX_METRICS=STATEMENTS_ON^
Report the total number of statements
@item ^--no-statements^/SYNTAX_METRICS=STATEMENTS_OFF^
Do not report the total number of statements
@item ^--public-subprograms^/SYNTAX_METRICS=PUBLIC_SUBPROGRAMS_ON^
Report the number of public subprograms in a compilation unit
@cindex @option{^-eas^/SUBPROGRAMS_ALL^} (@command{gnatmetric}) @item ^--no-public-subprograms^/SYNTAX_METRICS=PUBLIC_SUBPROGRAMS_OFF^
@item ^-eas^/SUBPROGRAMS_ALL^ Do not report the number of public subprograms in a compilation unit
The number of all the subprograms in a compilation unit
@cindex @option{^-ept^/INT_TYPES^} (@command{gnatmetric}) @item ^--all-subprograms^/SYNTAX_METRICS=ALL_SUBPROGRAMS_ON^
@item ^-ept^/INT_TYPES^ Report the number of all the subprograms in a compilation unit
The number of public types in a compilation unit
@cindex @option{^-eat^/TYPES_ALL^} (@command{gnatmetric}) @item ^--no-all-subprograms^/SYNTAX_METRICS=ALL_SUBPROGRAMS_OFF^
@item ^-eat^/TYPES_ALL^ Do not report the number of all the subprograms in a compilation unit
The number of all the types in a compilation unit
@cindex @option{^-enu^/PROGRAM_NESTING_MAX^} (@command{gnatmetric}) @item ^--public-types^/SYNTAX_METRICS=PUBLIC_TYPES_ON^
@item ^-enu^/PROGRAM_NESTING_MAX^ Report the number of public types in a compilation unit
The maximal program unit nesting level
@cindex @option{^-ec^/CONSTRUCT_NESTING_MAX^} (@command{gnatmetric}) @item ^--no-public-types^/SYNTAX_METRICS=PUBLIC_TYPES_OFF^
@item ^-ec^/CONSTRUCT_NESTING_MAX^ Do not report the number of public types in a compilation unit
The maximal construct nesting level
@item ^--all-types^/SYNTAX_METRICS=ALL_TYPES_ON^
Report the number of all the types in a compilation unit
@item ^--no-all-types^/SYNTAX_METRICS=ALL_TYPES_OFF^
Do not report the number of all the types in a compilation unit
@item ^--unit-nesting^/SYNTAX_METRICS=UNIT_NESTING_ON^
Report the maximal program unit nesting level
@item ^--no-unit-nesting^/SYNTAX_METRICS=UNIT_NESTING_OFF^
Do not report the maximal program unit nesting level
@item ^--construct-nesting^/SYNTAX_METRICS=CONSTRUCT_NESTING_ON^
Report the maximal construct nesting level
@item ^--no-construct-nesting^/SYNTAX_METRICS=CONSTRUCT_NESTING_OFF^
Do not report the maximal construct nesting level
@end table @end table
@node Complexity Metrics Control @node Complexity Metrics Control
@subsection Complexity Metrics Control @subsubsection Complexity Metrics Control
@cindex Complexity metrics control in @command{gnatmetric} @cindex Complexity metrics control in @command{gnatmetric}
@noindent @noindent
For a program unit that is an executable body (a subprogram body (including For a program unit that is an executable body (a subprogram body (including
generic bodies), task body, entry body or a package body containing generic bodies), task body, entry body or a package body containing
its own statement sequence ) @command{gnatmetric} computes the following its own statement sequence) @command{gnatmetric} computes the following
complexity metrics: complexity metrics:
@itemize @bullet @itemize @bullet
...@@ -16657,22 +16746,52 @@ When computing cyclomatic and essential complexity, @command{gnatmetric} skips ...@@ -16657,22 +16746,52 @@ When computing cyclomatic and essential complexity, @command{gnatmetric} skips
the code in the exception handlers and in all the nested program units. the code in the exception handlers and in all the nested program units.
By default, all the complexity metrics are computed and reported. By default, all the complexity metrics are computed and reported.
For more finely-grained control you can use For more fine-grained control you can use
the following switches: the following switches:
@table @option @table @option
@cindex @option{^-n@var{x}^/SUPPRESS^} (@command{gnatmetric}) @cindex @option{^-complexity@var{x}^/COMPLEXITY_METRICS^} (@command{gnatmetric})
@item ^-nocc^/SUPPRESS=CYCLOMATIC_COMPLEXITY^ @ifclear vms
Do not compute the McCabe Cyclomatic Complexity @cindex @option{--no-complexity@var{x}}
@end ifclear
@item ^--complexity-all^/COMPLEXITY_METRICS=ALL_ON^
Report all the complexity metrics
@item ^--no-complexity-all^/COMPLEXITY_METRICS=ALL_OFF^
Do not report any of complexity metrics
@item ^--complexity-cyclomatic^/COMPLEXITY_METRICS=CYCLOMATIC_ON^
Report the McCabe Cyclomatic Complexity
@item ^-noec^/SUPPRESS=ESSENTIAL_COMPLEXITY^ @item ^--no-complexity-cyclomatic^/COMPLEXITY_METRICS=CYCLOMATIC_OFF^
Do not compute the Essential Complexity Do not report the McCabe Cyclomatic Complexity
@item ^-nonl^/SUPPRESS=MAXIMAL_LOOP_NESTING^ @item ^--complexity-essential^/COMPLEXITY_METRICS=ESSENTIAL_ON^
Do not compute maximal loop nesting level Report the Essential Complexity
@item ^-ne^/SUPPRESS=EXITS_AS_GOTOS^ @item ^--no-complexity-essential^/COMPLEXITY_METRICS=ESSENTIAL_OFF^
Do not report the Essential Complexity
@item ^--loop-nesting^/COMPLEXITY_METRICS=LOOP_NESTING_ON^
Report maximal loop nesting level
@item ^--no-loop-nesting^/COMPLEXITY_METRICS=LOOP_NESTING_OFF^
Do not report maximal loop nesting level
@item ^--complexity-average^/COMPLEXITY_METRICS=AVERAGE_COMPLEXITY_ON^
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.
@item ^--no-complexity-average^/COMPLEXITY_METRICS=AVERAGE_COMPLEXITY_OFF^
Do not report the average McCabe Cyclomatic Complexity for all the subprogram
bodies, task bodies, entry bodies and statement sequences in package bodies
@cindex @option{^-ne^/NO_EXITS_AS_GOTOS^} (@command{gnatmetric})
@item ^-ne^/NO_EXITS_AS_GOTOS^
Do not consider @code{exit} statements as @code{goto}s when Do not consider @code{exit} statements as @code{goto}s when
computing Essential Complexity computing Essential Complexity
...@@ -16688,7 +16807,7 @@ Additional @command{gnatmetric} switches are as follows: ...@@ -16688,7 +16807,7 @@ Additional @command{gnatmetric} switches are as follows:
@item ^-files @var{filename}^/FILES=@var{filename}^ @item ^-files @var{filename}^/FILES=@var{filename}^
@cindex @option{^-files^/FILES^} (@code{gnatmetric}) @cindex @option{^-files^/FILES^} (@code{gnatmetric})
Take the argument source files from the specified file. This file should be an Take the argument source files from the specified file. This file should be an
ordinary textual file containing file names separated by spaces or ordinary text file containing file names separated by spaces or
line breaks. You can use this switch more then once in the same call to line breaks. You can use this switch more then once in the same call to
@command{gnatmetric}. You also can combine this switch with @command{gnatmetric}. You also can combine this switch with
an explicit list of files. an explicit list of files.
...@@ -16713,18 +16832,22 @@ Quiet mode. ...@@ -16713,18 +16832,22 @@ Quiet mode.
@node Generate project-wide metrics @node Generate project-wide metrics
@subsection Generate project-wide metrics @subsection Generate project-wide metrics
In order to compute metrics on all units of a given project, one can use In order to compute metrics on all units of a given project, you can use
the @command{gnat} driver along with the @option{-P} option: the @command{gnat} driver along with the @option{-P} option:
@smallexample @smallexample
gnat metric -Pproj gnat metric -Pproj
@end smallexample @end smallexample
If the project @code{proj} depends upon other projects, one can compute
@noindent
If the project @code{proj} depends upon other projects, you can compute
the metrics on the project closure using the @option{-U} option: the metrics on the project closure using the @option{-U} option:
@smallexample @smallexample
gnat metric -Pproj -U gnat metric -Pproj -U
@end smallexample @end smallexample
@noindent
Finally, if not all the units are relevant to a particular main Finally, if not all the units are relevant to a particular main
program in the project closure, one can generate metrics for the set program in the project closure, you can generate metrics for the set
of units needed to create a given main program (unit closure) using of units needed to create a given main program (unit closure) using
the @option{-U} option followed by the name of the main unit: the @option{-U} option followed by the name of the main unit:
@smallexample @smallexample
...@@ -305,6 +305,13 @@ package VMS_Data is ...@@ -305,6 +305,13 @@ package VMS_Data is
-- LOW Initialize with the lowest valid value of the subtype. -- LOW Initialize with the lowest valid value of the subtype.
-- HIGH Initialize with the highest valid value of the subtype. -- HIGH Initialize with the highest valid value of the subtype.
S_Bind_Leap : aliased constant S := "/ENABLE_LEAP_SECONDS " &
"-y";
-- /ENABLE_LEAP_SECONDS
-- /NOENABLE_LEAP_SECONDS (D)
--
-- Enable leap seconds support in Ada.Calendar and its children.
S_Bind_Library : aliased constant S := "/LIBRARY_SEARCH=*" & S_Bind_Library : aliased constant S := "/LIBRARY_SEARCH=*" &
"-aO*"; "-aO*";
-- /LIBRARY_SEARCH=(direc[,...]) -- /LIBRARY_SEARCH=(direc[,...])
...@@ -638,6 +645,7 @@ package VMS_Data is ...@@ -638,6 +645,7 @@ package VMS_Data is
S_Bind_Force 'Access, S_Bind_Force 'Access,
S_Bind_Help 'Access, S_Bind_Help 'Access,
S_Bind_Init 'Access, S_Bind_Init 'Access,
S_Bind_Leap 'Access,
S_Bind_Library 'Access, S_Bind_Library 'Access,
S_Bind_Linker 'Access, S_Bind_Linker 'Access,
S_Bind_Main 'Access, S_Bind_Main 'Access,
...@@ -4486,25 +4494,81 @@ package VMS_Data is ...@@ -4486,25 +4494,81 @@ package VMS_Data is
"-enu " & "-enu " &
"CONSTRUCT_NESTING_MAX " & "CONSTRUCT_NESTING_MAX " &
"-ec"; "-ec";
-- /ELEMENT_METRICS=(option, option ...) -- NODOC (see /SYNTAX_METRICS)
--
-- Specifies the element metrics to be computed (if not set, all the S_Metric_Syntax : aliased constant S := "/SYNTAX_METRICS=" &
-- element metrics are set on, otherwise only specified metrics are "ALL_ON " &
-- computed and reported) "--syntax-all " &
"ALL_OFF " &
"--no-syntax-all " &
"DECLARATIONS_ON " &
"--declarations " &
"DECLARATIONS_OFF " &
"--no-declarations " &
"STATEMENTS_ON " &
"--statements " &
"STATEMENTS_OFF " &
"--no-statements " &
"PUBLIC_SUBPROGRAMS_ON " &
"--public-subprograms " &
"PUBLIC_SUBPROGRAMS_OFF " &
"--no-public-subprograms " &
"ALL_SUBPROGRAMS_ON " &
"--all-subprograms " &
"ALL_SUBPROGRAMS_OFF " &
"--no-all-subprograms " &
"PUBLIC_TYPES_ON " &
"--public-types " &
"PUBLIC_TYPES_OFF " &
"--no-public-types " &
"ALL_TYPES_ON " &
"--all-types " &
"ALL_TYPES_OFF " &
"--no-all-types " &
"UNIT_NESTING_ON " &
"--unit-nesting " &
"UNIT_NESTING_OFF " &
"--no-unit-nesting " &
"CONSTRUCT_NESTING_ON " &
"--construct-nesting " &
"CONSTRUCT_NESTING_OFF " &
"--no-construct-nesting";
-- /SYNTAX_METRICS(option, option ...)
--
-- Specifies the syntax element metrics to be computed (if at least one
-- positive syntax element metric, line metric or complexity metric is
-- specified then only explicitly specified specified syntax element
-- metrics are computed and reported)
-- --
-- option may be one of the following: -- option may be one of the following:
-- --
-- ALL (D) All the element metrics are computed -- ALL_ON (D) All the syntax element metrics are computed
-- DECLARATION_TOTAL Compute the total number of declarations -- ALL_OFF None of syntax element metrics is computed
-- STATEMENT_TOTAL Compute the total number of statements -- DECLARATIONS_ON Compute the total number of declarations
-- LOOP_NESTING_MAX Compute the maximal loop nesting level -- DECLARATIONS_OFF Do not compute the total number of
-- INT_SUBPROGRAMS Compute the number of interface subprograms -- declarations
-- SUBPROGRAMS_ALL Compute the number of all the subprograms -- STATEMENTS_ON Compute the total number of statements
-- INT_TYPES Compute the number of interface types -- STATEMENTS_OFF Do not compute the total number of
-- TYPES_ALL Compute the number of all the types -- statements
-- PROGRAM_NESTING_MAX Compute the maximal program unit nesting level -- PUBLIC_SUBPROGRAMS_ON Compute the number of public subprograms
-- -- PUBLIC_SUBPROGRAMS_OFF Do not compute the number of public
-- All combinations of element metrics options are allowed. -- subprograms
-- ALL_SUBPROGRAMS_ON Compute the number of all the subprograms
-- ALL_SUBPROGRAMS_OFF Do not compute the number of all the
-- subprograms
-- PUBLIC_TYPES_ON Compute the number of public types
-- PUBLIC_TYPES_OFF Do not compute the number of public types
-- ALL_TYPES_ON Compute the number of all the types
-- ALL_TYPES_OFF Do not compute the number of all the types
-- UNIT_NESTING_ON Compute the maximal program unit nesting
-- level
-- UNIT_NESTING_OFF Do not compute the maximal program unit
-- nesting level
-- CONSTRUCT_NESTING_ON Compute the maximal construct nesting level
-- CONSTRUCT_NESTING_OFF Do not compute the maximal construct nesting
-- level
--
-- All combinations of syntax element metrics options are allowed.
S_Metric_Ext : aliased constant S := "/EXTERNAL_REFERENCE=" & '"' & S_Metric_Ext : aliased constant S := "/EXTERNAL_REFERENCE=" & '"' &
"-X" & '"'; "-X" & '"';
...@@ -4565,27 +4629,139 @@ package VMS_Data is ...@@ -4565,27 +4629,139 @@ package VMS_Data is
"COMMENT_PERCENTAGE " & "COMMENT_PERCENTAGE " &
"-lratio " & "-lratio " &
"BLANK_LINES " & "BLANK_LINES " &
"-lb "; "-lb " &
-- /LINE_METRICS=(option, option ...) "AVERAGE_LINES_IN_BODIES " &
"-lav ";
-- Specifies the line metrics to be computed (if not set, all the line -- NODOC (see /LINE_COUNT_METRICS)
-- metrics are set on, otherwise only specified metrics are computed and
S_Metric_Lines : aliased constant S := "/LINE_COUNT_METRICS=" &
"ALL_ON " &
"--lines-all " &
"ALL_OFF " &
"--no-lines-all " &
"ALL_LINES_ON " &
"--lines " &
"ALL_LINES_OFF " &
"--no-lines " &
"CODE_LINES_ON " &
"--lines-code " &
"CODE_LINES_OFF " &
"--no-lines-code " &
"COMMENT_LINES_ON " &
"--lines-comment " &
"COMMENT_LINES_OFF " &
"--no-lines-comment " &
"CODE_COMMENT_LINES_ON " &
"--lines-eol-comment " &
"CODE_COMMENT_LINES_OFF " &
"--no-lines-eol-comment " &
"COMMENT_PERCENTAGE_ON " &
"--lines-ratio " &
"COMMENT_PERCENTAGE_OFF " &
"--no-lines-ratio " &
"BLANK_LINES_ON " &
"--lines-blank " &
"BLANK_LINES_OFF " &
"--no-lines-blank " &
"AVERAGE_BODY_LINES_ON " &
"--lines-average " &
"AVERAGE_BODY_LINES_OFF " &
"--no-lines-average";
-- /LINE_COUNT_METRICS=(option, option ...)
-- Specifies the line metrics to be computed (if at least one positive
-- syntax element metric, line metric or complexity metric is specified
-- then only explicitly specified specified line metrics are computed and
-- reported) -- reported)
-- --
-- option may be one of the following: -- option may be one of the following:
-- --
-- ALL (D) All the line metrics are computed -- ALL_ON (D) All the line metrics are computed
-- LINES_ALL All lines are computed -- ALL_OFF None of line metrics is computed
-- CODE_LINES Lines with Ada code are computed -- ALL_LINES_ON All lines are computed
-- COMENT_LINES All comment lines are computed -- ALL_LINES_OFF All lines are not computed
-- MIXED_CODE_COMMENTS All lines containing both code and comment are -- CODE_LINES_ON Lines with Ada code are computed
-- computed -- CODE_LINES_OFF Lines with Ada code are not computed
-- COMMENT_PERCENTAGE Ratio between comment lines and all the lines -- COMMENT_LINES_ON Comment lines are computed
-- containing comments and program code -- COMMENT_LINES_OFF Comment lines are not computed
-- BLANK_LINES Blank lines are computed -- COMMENT_PERCENTAGE_ON Ratio between comment lines and all the
-- lines containing comments and program code
-- is computed
-- COMMENT_PERCENTAGE_OFF Ratio between comment lines and all the
-- lines containing comments and program code
-- is not computed
-- BLANK_LINES_ON Blank lines are computed
-- BLANK_LINES_OFF Blank lines are not computed
-- AVERAGE_BODY_LINES_ON Average number of code lines in subprogram,
-- task and entry bodies and statement
-- sequences of package bodies is computed
-- AVERAGE_BODY_LINES_OFF Average number of code lines in subprogram,
-- task and entry bodies and statement
-- sequences of package bodies is not computed
--
-- All combinations of line metrics options are allowed.
S_Metric_Complexity : aliased constant S := "/COMPLEXITY_METRICS=" &
"ALL_ON " &
"--complexity-all " &
"ALL_OFF " &
"--no-complexity-all " &
"CYCLOMATIC_ON " &
"--complexity-cyclomatic " &
"CYCLOMATIC_OFF " &
"--no-complexity-cyclomatic " &
"ESSENTIAL_ON " &
"--complexity-essential " &
"ESSENTIAL_OFF " &
"--no-complexity-essential " &
"LOOP_NESTING_ON " &
"--loop-nesting " &
"LOOP_NESTING_OFF " &
"--no-loop-nesting " &
"AVERAGE_COMPLEXITY_ON " &
"--complexity-average " &
"AVERAGE_COMPLEXITY_OFF " &
"--no-complexity-average";
-- /COMPLEXITY_METRICS=(option, option ...)
-- Specifies the complexity metrics to be computed (if at least one
-- positive syntax element metric, line metric or complexity metric is
-- specified then only explicitly specified specified line metrics are
-- computed and reported)
--
-- option may be one of the following:
--
-- ALL_ON (D) All the complexity metrics are computed
-- ALL_OFF None of complexity metrics is computed
-- CYCLOMATIC_ON Compute the McCabe Cyclomatic Complexity
-- CYCLOMATIC_OFF Do not compute the McCabe Cyclomatic
-- Complexity
-- ESSENTIAL_ON Compute the Essential Complexity
-- ESSENTIAL_OFF Do not ompute the Essential Complexity
-- LOOP_NESTIMG_ON Compute the maximal loop nesting
-- LOOP_NESTIMG_OFF Do not compute the maximal loop nesting
-- AVERAGE_COMPLEXITY_ON Compute the average complexity for
-- executable bodies
-- AVERAGE_COMPLEXITY_OFF Do not compute the average complexity for
-- executable bodies
-- --
-- All combinations of line metrics options are allowed. -- All combinations of line metrics options are allowed.
S_Metric_No_Local : aliased constant S := "/NO_LOCAL_DETAILS " &
"-nolocal";
-- /LOCAL_DETAILS (D)
-- /NO_LOCAL_DETAILS
--
-- Do not compute the detailed metrics for local program units.
S_Metric_No_Exits_As_Gotos : aliased constant S := "/NO_EXITS_AS_GOTOS " &
"-ne";
-- /EXITS_AS_GOTOS (D)
-- /NO_EXITS_AS_GOTOS
--
-- Do not count EXIT statements as GOTOs when computing the Essential
-- Complexity.
S_Metric_Mess : aliased constant S := "/MESSAGES_PROJECT_FILE=" & S_Metric_Mess : aliased constant S := "/MESSAGES_PROJECT_FILE=" &
"DEFAULT " & "DEFAULT " &
"-vP0 " & "-vP0 " &
...@@ -4643,22 +4819,7 @@ package VMS_Data is ...@@ -4643,22 +4819,7 @@ package VMS_Data is
"-ne " & "-ne " &
"LOCAL_DETAILS " & "LOCAL_DETAILS " &
"-nolocal "; "-nolocal ";
-- /SUPPRESS=(option, option ...) -- NODOC (see /COMPLEXITY_METRICS /NO_LOCAL_DETAILS /NO_EXITS_AS_GOTOS)
--
-- Specifies the metric that should not be computed
--
-- option may be one of the following:
--
-- NOTHING (D) Do not suppress computation of any metric
-- CYCLOMATIC_COMPLEXITY Do not compute the Cyclomatic Complexity
-- ESSENTIAL_COMPLEXITY Do not compute the Essential Complexity
-- MAXIMAL_LOOP_NESTING Do not compute the maximal loop nesting
-- EXITS_AS_GOTOS Do not count EXIT statements as GOTOs when
-- computing the Essential Complexity
-- LOCAL_DETAILS Do not compute the detailed metrics for local
-- program units
--
-- All combinations of options are allowed.
S_Metric_Verbose : aliased constant S := "/VERBOSE " & S_Metric_Verbose : aliased constant S := "/VERBOSE " &
"-v"; "-v";
...@@ -4676,6 +4837,7 @@ package VMS_Data is ...@@ -4676,6 +4837,7 @@ package VMS_Data is
Metric_Switches : aliased constant Switches := Metric_Switches : aliased constant Switches :=
(S_Metric_Add 'Access, (S_Metric_Add 'Access,
S_Metric_All_Prjs 'Access, S_Metric_All_Prjs 'Access,
S_Metric_Complexity 'Access,
S_Metric_Debug 'Access, S_Metric_Debug 'Access,
S_Metric_Direct 'Access, S_Metric_Direct 'Access,
S_Metric_Element 'Access, S_Metric_Element 'Access,
...@@ -4684,10 +4846,14 @@ package VMS_Data is ...@@ -4684,10 +4846,14 @@ package VMS_Data is
S_Metric_Format 'Access, S_Metric_Format 'Access,
S_Metric_Globout 'Access, S_Metric_Globout 'Access,
S_Metric_Line 'Access, S_Metric_Line 'Access,
S_Metric_Lines 'Access,
S_Metric_Mess 'Access, S_Metric_Mess 'Access,
S_Metric_No_Exits_As_Gotos'Access,
S_Metric_No_Local 'Access,
S_Metric_Project 'Access, S_Metric_Project 'Access,
S_Metric_Quiet 'Access, S_Metric_Quiet 'Access,
S_Metric_Suffix 'Access, S_Metric_Suffix 'Access,
S_Metric_Syntax 'Access,
S_Metric_Suppress 'Access, S_Metric_Suppress 'Access,
S_Metric_Verbose 'Access, S_Metric_Verbose 'Access,
S_Metric_XMLout 'Access); S_Metric_XMLout 'Access);
......
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