Mandatory DECIMAL and MONEY precision rules
The mandatory decimal precision rule checks to see that a precision has been defined for
an identifier of the DECIMAL
or MONEY
data type.
The ruleId
The ruleId is
type.precision.mandatory
,
where type is:decimal
money
Options
The options available for mandatory DECIMAL and MONEY precision rules are:
.enabled
specifies whether a rule is enabled. Valid values aretrue
orfalse
..severity
specifies the severity level. Valid values areerror
,info
, orwarning
(default).Warning: If the severity is set toerror
, the compilation will fail if the rule is broken.
Examples
To check that all
DECIMAL
identifiers specify a precision, and to output a
warning if an exception is found, specify these
rules:decimal.precision.mandatory.enabled = true
decimal.precision.mandatory.severity = warning
Additional examples are provided in the default.gslint file.