Next: Project-Wide Checks, Previous: gnatcheck Rule Options [Contents][Index]
gnatcheck
OutputThe gnatcheck
tool can include in the generated diagnostic messages
and in
the report file the results of the checks performed by the compiler. Though
disabled by default, this effect may be obtained by using +R with
the following rule identifiers and parameters:
To record restrictions violations (which are performed by the compiler if the
pragma Restrictions
or Restriction_Warnings
are given),
use the Restrictions
rule
with the same parameters as pragma
Restrictions
or Restriction_Warnings
.
To record compiler style checks
(see Style Checking section in
GNAT User’s Guide),
use the
Style_Checks
rule.
This rule takes a parameter in one of the following forms:
All_Checks
,
which enables the standard style checks corresponding to the -gnatyy
GNAT style check option, or
string_LITERAL
parameter of the
GNAT pragma Style_Checks
(for further information about this pragma,
see Pragma Style_Checks in GNAT Reference Manual).
For example, the
+RStyle_Checks:O
rule option activates
the compiler style check that corresponds to
-gnatyO
style check option.
To record compiler warnings
(see Warning Message Control section in
GNAT User’s Guide),
use the
Warnings
rule with a parameter that is a valid
static_string_expression argument of the GNAT pragma Warnings
(for further information about this pragma,
see Pragma Warnings in GNAT Reference Manual).
Note that in case of gnatcheck
’s’ parameter, that corresponds to the GNAT -gnatws option, disables
all the specific warnings, but not suppresses the warning mode,
and ’e’ parameter, corresponding to -gnatwe that means
"treat warnings as errors", does not have any effect.
To disable a specific restriction check, use -RRestrictions
gnatcheck
option with the corresponding restriction name as a parameter. -R
is
not available for Style_Checks
and Warnings
options, to disable
warnings and style checks, use the corresponding warning and style options.
Next: Project-Wide Checks, Previous: gnatcheck Rule Options [Contents][Index]