R230 Use a parameter when only a value differs, and a one-of when the requirement does
When the ways of meeting a need differ only in one value filled into the same sentence, write one rule that names a parameter for that value; when they differ in the requirement itself, write a one-of whose options are each a complete rule. Write no condition on a parameter’s value into a rule’s text.
Reason
A parameter keeps one sentence and one check for every value, and the rule set chooses the value as a linter’s configuration chooses a setting. Ways that differ in how the sentence is built, in what the agent does or in how compliance is checked are different requirements: folded into one rule that branches on a value (“if A, do this; if B, do that”), the rule becomes a small program that every reader has to evaluate, and whether something violates it depends on a value the text does not show (Art. VII §5). Written out as the options of a one-of, each reads and is checked on its own. Each mechanism used for what it fits, and no third one built on top of them, is the simplest set (Art. III §4). The line drawn here is the one between rule 101, which leaves a rule’s concrete values to the layers below, and rule 103, which writes conflicting practices as a one-of.
Verification
A value here is a word, a number, a name or a code that fills one slot of an otherwise identical sentence, such as the language of commit messages or the name of a label; the rule and its check read the same whatever the value. The requirement differs when the options need different sentences, different actions or different checks. A condition on a parameter’s value is any text in a rule that says what to do depending on what the parameter is set to.
Violated when a change adds or rewrites rules so that options differing only in one such value are written as a one-of or as separate rules, so that options differing in the requirement share one rule through a parameter, or so that a rule’s text holds a condition on a parameter’s value.