Next: , Previous: Misnamed_Controlling_Parameters, Up: Predefined Rules


23.7.35 Misnamed_Identifiers

Flag the declaration of each identifier that does not have a suffix corresponding to the kind of entity being declared. The following declarations are checked:

This rule may have parameters. When used without parameters, the rule enforces the following checks:

Defining identifiers from incomplete type declarations are never flagged.

For a private type declaration (including private extensions), the defining identifier from the private type declaration is checked against the type suffix (even if the corresponding full declaration is an access type declaration), and the defining identifier from the corresponding full type declaration is not checked.

For a deferred constant, the defining name in the corresponding full constant declaration is not checked.

Defining names of formal types are not checked.

The rule may have the following parameters:

If more than one parameter is used, parameters must be separated by commas.

If more than one option is specified for the gnatcheck invocation, a new option overrides the previous one(s).

The +RMisnamed_Identifiers option (with no parameter) enables checks for all the name suffixes specified by previous options used for this rule.

The -RMisnamed_Identifiers option (with no parameter) disables all the checks but keeps all the suffixes specified by previous options used for this rule.

The string value must be a valid suffix for an Ada identifier (after trimming all the leading and trailing space characters, if any). Parameters are not case sensitive, except the string part.

If any error is detected in a rule parameter, the parameter is ignored. In such a case the options that are set for the rule are not specified.