Next: , Previous: Non_Visible_Exceptions, Up: Predefined Rules


23.6.35 Numeric_Literals

Flag each use of a numeric literal in an index expression, and in any circumstance except for the following:

This rule may have the following parameters for the +R option:

N
N is an integer literal used as the maximal value that is not flagged (i.e., integer literals not exceeding this value are allowed)
ALL
All integer literals are flagged

If no parameters are set, the maximum unflagged value is 1.

The last specified check limit (or the fact that there is no limit at all) is used when multiple +R options appear.

The -R option for this rule has no parameters. It disables the rule but retains the last specified maximum unflagged value. If the +R option subsequently appears, this value is used as the threshold for the check.