Only one variable per type inside a single declaration rules
This variable declaration rule checks that no more than one variable has been declared per type inside a single declaration.
The ruleId
The ruleId is typeDeclarationPerVariable.
Options
The options available for the no more than one variable has been declared per type inside a
single declaration rules are:
.enabledspecifies whether a rule is enabled. Valid values aretrueorfalse..severityspecifies 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.
Example
To ensure that only one variable has been declared per type inside a single declaration, and to output an warning if an exception is found, specify these rules:typeDeclarationPerVariable.enabled = true
typeDeclarationPerVariable.severity = warningIn
this example, this declaration would be
compliant:
DEFINE a INTEGER, b INTEGERIn this example, this declaration
would NOT be compliant:
DEFINE a, b INTEGER