Previous: gnatcheck Rule Options, Up: Verifying properties using gnatcheck


23.4 Add the Results of Compiler Checks to gnatcheck Output

The 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:

Restrictions
To record restrictions violations (that are performed by the compiler if the pragma Restrictions or Restriction_Warnings are given), use the rule named Restrictions with the same parameters as pragma Restrictions or Restriction_Warnings
Style_Checks
To record compiler style checks, use the rule named Style_Checks. A parameter of this rule can be either All_Checks, that turns ON all the style checks, or a string that has exactly the same structure and semantics as string_LITERAL parameter of GNAT pragma Style_Checks.
Warnings
To record compiler warnings (see Warning Message Control), use the rule named Warnings with a parameter that is a valid static_string_expression argument of GNAT pragma Warnings.